Reputation: 1
Here is the script I have been trying:
#!/bin/bash
case “$1” in
[0-9][A-Z])
echo “ <<Usage: $0 >> Script5.rc argb ”
;;
./Script.rc
But when I run it, I get the following error:
syntax error near unexpected token
What am I doing wrong here?
Upvotes: 0
Views: 731
Reputation: 6554
Two problems:
1) Those are unicode quotes. Those can eff up a script. Do not write code in microsoft word.
2) You forgot to end your case.
case "$1" in
[0-9][A-Z])
echo " <<Usage: $0 >> Script5.rc argb "
;;
esac
Upvotes: 6
Reputation: 143259
case
is supposed to end with esac
. So, at the very least your code sample is incomplete.
Upvotes: 1