[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



Words by aragonx dcsnow com [Thu, Nov 08, 2007 at 12:44:27PM -0500]:
> Okay, I saw a neat trick at work the other day.  A coworker somehow got
> the shell to do looping without creating a file.  I believe he was using
> csh to do so and I was wondering if I could do the same thing in bash. 
> Basically I would like to be able to do a while loop to execute a df
> command.
> 
> Any ideas?
> 

$ while  [ 1 ] ; do df ; sleep 1 ;done

?

-- 
Jose Celestino
----------------------------------------------------------------
http://www.msversus.org/     ; http://techp.org/petition/show/1
http://www.vinc17.org/noswpat.en.html
----------------------------------------------------------------
"And on the trillionth day, Man created Gods." -- Thomas D. Pate


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]