stupid bash tricks (how to loop on the command line)

Miner, Jonathan W (CSC) (US SSA) jonathan.w.miner at baesystems.com
Thu Nov 8 17:48:51 UTC 2007




> ... got the shell to do looping without creating a file. 

Just type it in...

bash-3.2$ i=0; while [ $i -lt 10 ]; do echo $i; i=`expr $i + 1`; done




-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2525 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071108/5fbdb66b/attachment-0001.bin>


More information about the fedora-list mailing list