I learned this technique from a fellow participant .
$ yes |nl |head -100 |cut -f1
You can remove the new lines as below.
$ yes |nl |head -100 | cut -f1| tr ‘\n’ ‘\t’
Cool.
Otherwise, my course is progressing well. I wrote a simple file transfer daemon and implemented the client.. Now, I have to do the same with pthreads and non blocking calls. We had the first glimpse of kernel programming today when some kernel data structures for process and memory managment was iintroduced. I have to read a lot to get the exact picture.
Why not just use the for loop?
for ((i=1;i<=100;i++)); do echo $i; done
@ Binny
Sure I know that. But I was seeing ‘yes’ being used for it for the first time
Interesting use for yes ! for normal use:
seq 100
is probably more efficient.