[nflug] bash scripting question
Darin.Perusich at cognigencorp.com
Tue Jul 8 08:29:12 EDT 2008
When testing conditions in bash you might may want to use the extended
test command [[...]] which allow the use of conditional operators like
&&, ||, <, and >.
Additionally when you "exit", setting an exit status other then the
default of 1 might prove useful if this script was called from another.
You could test the exit value, $? and depending on the value do
Daniel Magnuszewski wrote:
> ...I forgot to include the exit logic (Plus, this is a cleaner format):
> if [ -e filename ];
> echo "Exiting Program"
> echo "Continue Program"
Unix Systems Administrator
395 Youngs Rd.
Williamsville, NY 14221
Email: darinper at cognigencorp.com
More information about the nflug