You are not logged in.
Pages: 1
I have been looking at other scripts, they all seem to use case similarly, but I can't figure out why case doesn't like my case statement. Heres an exert from my code, which contains the case statement (ask for the whole thing if you want):
while [ "$#" -ne "0" ]; do
case $1 in
--help)
usage
exit 0
;;
-h)
usage
exit 0
;;
--extra)
core
extra
finalmsg
exit 0
;;
-e)
core
extra
finalmsg
exit 0
;;
esac
done
That should just check if I am running using the -h, --help, -e, or --extra flags, but what I get for every one (by using comments to block out the rest):
../e17-svn-builder.sh: line 177: syntax error near unexpected token `;;'
../e17-svn-builder.sh: line 177: ` ;;'
It was working fine yesterday, and I tried commenting out each piece in each group, nothing works. Can someone help? Thanks.
Offline
Looks fine, it's probably a while or even a (, or [ that is improperly closed.
You'll have to post the entire script.
Offline
Thanks, that told me to look over the new additions I made to it, and lo and behold, a missing ). Thanks for mentioning it though, I probably would have never caught it.
Offline
Pages: 1