Sep 072010
POSIXExpressions-CharacterClasses
#!/bin/bash
#Make sure there are two arguments entered on the command line.
if [ $# -ne 2 ]
then
echo “Error in $0 – Invalid Argument Count”
echo “Error in $0 – Need two arguments”
echo “Example Syntax: $0 input_file output_file”
exit
fi
#Check if a file exists
if [ ! -f $infile ]
then
echo “Input file [$infile] not found – Aborting”
exit
fi