Posterous

Evan’s posterous

Adventures in pomodoro and other such things

Filed underscript

See all posts on Posterous with this tag »

Evan Jehu


 
Evan Jehu's profile »

Tags

  • linux (20)
  • mac (7)
  • ssh (4)
  • yoga (4)
  • java (3)
  • maven (3)
  • cheat sheet (2)
  • mysql (2)
  • mythtv (2)
  • python (2)
  • View all 37 tags »
  • quote (2)
  • subversion (2)
  • template (2)
  • trac (2)
  • apache (1)
  • appengine (1)
  • apt-get (1)
  • backup (1)
  • bash (1)
  • blackberry (1)
  • cool app (1)
  • cron (1)
  • firefox (1)
  • flash (1)
  • humor (1)
  • img (1)
  • openssl (1)
  • pomodoro technique (1)
  • project (1)
  • regex (1)
  • rpm (1)
  • safari (1)
  • script (1)
  • usb (1)
  • video (1)
  • visualization (1)
  • web (1)
Subscribe to this posterous »
Unsubscribe »
Loading...
June 25, 2009

simple bash script template to process a file

  • Edit
  • Delete
  • 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

Filed under  //

  • bash
  • linux
  • script
  • template

Comments [0]