Evan's posterous

Adventures in pomodoro and other such things

Filed underscript

See all posts on Posterous with this tag »

Evan Jehu


Tumblr
Evan Jehu's profile »

Tags

  • linux (20)
  • mac (7)
  • ssh (4)
  • yoga (4)
  • java (3)
  • maven (3)
  • mysql (3)
  • cheat sheet (2)
  • mythtv (2)
  • python (2)
  • View all 38 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)
  • sql (1)
  • usb (1)
  • video (1)
  • visualization (1)
  • web (1)

Archive

2011 (1)
September (1)
2009 (33)
October (6)
August (3)
July (5)
June (17)
May (1)
March (1)
2008 (4)
October (1)
September (1)
May (1)
January (1)
2007 (8)
October (1)
September (1)
August (2)
July (2)
May (1)
April (1)
2004 (1)
January (1)
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

Filed under  //

  • bash
  • linux
  • script
  • template
  • 0 responses
  • Like
  • Comment