Evan's posterous

Adventures in pomodoro and other such things

« Back to posts
  • Viewed
    times

Filed under

  • bash
  • linux
  • script
  • template
June 25, 2009

simple bash script template to process a file

  • Edit
  • Delete
  • Tags
  • Autopost

#!/bin/bash
 
if [[ "$#" == 1 && -f $1 ]];
then
 # replace with something functional like 'rm -f $1'!
 echo "file $1 exists"
else
 echo "Usage: $0 "
fi

  • 0 responses
  • Like
  • Comment