Skip to content

Run all scripts under in a directory

Run all scripts under in a directory

Answer:

Create the following bash script, and execute it

for FILE in /project/scripts/*.sh
do
    if [-f $FILE -a -x $FILE]
    then
        $FILE
    fi
done
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  1. How to mass rename file in Bash
  2. Create a directory tree in Linux
  3. How to check which directory used up most of the disk space?
  4. How to perform syntax check on a bash script?
  5. Serve current directory using HTTP with a single command

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*