![]() |
Basic shell scripting 101 - Looping
Hi- Was wondering if I could get help with a shell script I am writing to read in 10 -20 directories from a filesystem and then pause, press any key and then read in another 10 or 20 directories and pause again until I read them all. Here is my code - a bit embarrassing...
|
Nice post. Thank you for taking the time to publish this information very useful!
|
As a result, we have for and while loops in the Bourne shell. This is somewhat fewer features than other languages, but nobody claimed that shell programming has the power of C. #!/bin/sh for i in 1 2 3 4 5 do echo "Looping number $i" done.
|
| All times are GMT -4. The time now is 07:43 AM. |
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.