I am running the GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu) Copyright (C) 2002 Free Software Foundation, Inc.
I tried to use the getopts function in my script. However, I always get the following error message:
./status: line 109: syntax error near unexpected token `;;'
./status: line 109: ` f ) flagf="TRUE";; '
while getopts ":fp" Option
do
case $Option in
f ) flagf="TRUE";;
p ) flagp="TRUE";;
* ) echo "Unimplemented option chosen."; exit 1;;
esac
done
shift $(($OPTIND - 1))
The code above works fine on an HP-UX machine, running the GNU bash, version 2.04.0(1)-release (hppa2.0w-hp-hpux11.00)
Copyright 1999 Free Software Foundation, Inc.
Can anybody give me a hint ?
Thanks!
I tried to use the getopts function in my script. However, I always get the following error message:
./status: line 109: syntax error near unexpected token `;;'
./status: line 109: ` f ) flagf="TRUE";; '
while getopts ":fp" Option
do
case $Option in
f ) flagf="TRUE";;
p ) flagp="TRUE";;
* ) echo "Unimplemented option chosen."; exit 1;;
esac
done
shift $(($OPTIND - 1))
The code above works fine on an HP-UX machine, running the GNU bash, version 2.04.0(1)-release (hppa2.0w-hp-hpux11.00)
Copyright 1999 Free Software Foundation, Inc.
Can anybody give me a hint ?
Thanks!