for loop in bash script on solaris without seq

2010-06-11 1 min read Solaris

Today I was working on a solaris box and wanted to do a watch. watch command is not available on Solaris 8 by default and I did not want to install it just for this small one time job. So I wrote this:

for (( i=0; i<=100; i++ )); do ls -lrt /tmp/amit*; sleep 2; done

You can replace the command in bold with whatever command you want to watch.

comments powered by Disqus