for loop in bash script on solaris without seq

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.

About Amit Agarwal

2 Comments on “for loop in bash script on solaris without seq”

3 Trackbacks on “for loop in bash script on solaris without seq”

  1. Pingback: keezmovie