[Fedora] Re: stupid bash tricks (how to loop on the command line)
Ashley M. Kirchner
ashley at pcraft.com
Thu Nov 8 17:51:37 UTC 2007
Jose Celestino wrote:
> $ while [ 1 ] ; do df ; sleep 1 ;done
Or:
$ while true ; do df ; sleep 1 ; done
Or:
$ while true <return>
> do df <return>
> sleep 1 <return>
> done <return>
CTRL-C to break out of it, or write your own catch trigger within
the while loop to exit.
--
W | It's not a bug - it's an undocumented feature.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley at pcraft.com> . 303.442.6410 x130
IT Director / SysAdmin / Websmith . 800.441.3873 x130
Photo Craft Imaging . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
More information about the fedora-list
mailing list