• About My website
  • Search

Amit Agarwal Linux Blog

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.

Continue reading
For Loop Seq Solaris Watch
Latest posts
  • Mobile_App_Mindmap
  • Check Price and Token Limits in ZapGPT with OpenAI Provider
  • How to Use AI to Create Commit Messages with ZapGPT
  • Working with Gzip Files in Linux: Seamless Integration with Popular Tools
  • Exploring AI Models with ZapGPT: A Simplified Approach
  • Don’t Enter Your Password Into That Website: A Rant You Need to Hear
  • How Vim Can Make a Hacker’s Life Easier with Macros and Registers
Categories
  • Linux (529)
  • Fedora (343)
  • Bash (215)
  • Uncategorized (191)
  • Learning (156)
  • Photo (76)
  • Vim Tips (37)
Social media
© 2018 - 2025 by Amit Agarwal - rss
Bilberry Hugo Theme