bash scripting options double semicolon
Hi
I have a small question about bash scripting this is the snippet I'm asking about Code:
#!/bin/bash Why do we need double semicolon after each option I tried to remove the semicolon it gives me this error Code:
syntax error near unexpected token `)' |
You need the double semicolon at the end of each case clause because that is what bash syntax requires in order to parse the command correctly.
http://tldp.org/LDP/Bash-Beginners-G...ect_07_03.html Remember that each case clause may have multiple statements within that clause, each terminated with an optional semicolon. Bash needs to know when the clause itself is finished, hence the double semicolon. |
thanks for the reply.
|
Glad to help, secomax.
If you consider your question solved then you can mark the thread accordingly using "Thread Tools" at the top of the thread. |
All times are GMT -5. The time now is 05:03 AM. |