for loop in bash script on solaris without seq

2010-06-11 70 words 1 min read

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.


author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it