= 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 {{tag>scripts}}