[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)



aragonx dcsnow com escribĂ­o:
> 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?
> 
> 
> 

how about "watch" which repeats the command every 2 secs?

or if you want to do it for a few times

for f in $(seq 1 100); do df; done

-- 
Brian Millett - [ Garibaldi, "The Gathering"]
"Commander, this little breach of security isn't going to affect my
 Christmas bonus, is it?"


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