The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
simple shell script, ls while loop, can't use a file
Madpandasuburbs west of chicagoRegistered Userregular
Trying to create a simple shell script which will do something like
while 1 (i want to create an infinite loop until broken out of)
ls -ltr filename*
sleep 100
I need to run this from a linux command line and can't read from a file. I thought there was a way to do this but I haven't been able to get it working.
Madpandasuburbs west of chicagoRegistered Userregular
edited May 2012
Nope i just want to be able to run ls -ltr file* and have it output to terminal every minute or so, without putting an actual shell script on the machine.
Nope i just want to be able to run ls -ltr file* and have it output to terminal every minute or so, without putting an actual shell script on the machine.
Samael the Radiant Faced-- Official Naming, Going Nuclear, Click on the Quest, Make She Run and Guild Measurements Officer - Clawshrimp & Co, Draenor-US
Posts
`ls -ltr "filename*"`
Do you want to assign the results to a variable or something to be able to test results?
Steam/PSN/XBL/Minecraft / LoL / - Benevicious | WoW - Duckwood - Rajhek
from:
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_09_02.html
Or you could use watch.
http://ss64.com/bash/watch.html