Huỳnh Hiền
New member
How do you end a shell script?
Answer
2 Answers.
Try replacing the last line ( endif ) with fi, which is the correct token to close an if statement. Also, replace ($2 == “both”) with the correct [ $2 == “both” ] . Note the quotes around $2 , the spaces after [ and before ] and the ; before the then .
Answer
2 Answers.
Try replacing the last line ( endif ) with fi, which is the correct token to close an if statement. Also, replace ($2 == “both”) with the correct [ $2 == “both” ] . Note the quotes around $2 , the spaces after [ and before ] and the ; before the then .