This shows you the differences between two versions of the page.
actionifileindir [2013/05/18 08:55] (current)
|Line 1:||Line 1:|
|+||= Script: Bash: If File in Directory Then =|
|+||This is a short special page just dedicated to one command or script. The purpose here is just for me to learn scripting. I think most people will think these snippets are too simple too take notice from.|
|+||for i in `ls -1 | grep was-`; do if [ -f $i/.run ]; then echo start slot $i; fi; done|
|+||* ls -1 lists all files and directories each on a separate line|
|+||* [ -f ] is true if listed file is a regular file|