Write a shell script. Where is the error? -- Linux general technology-Linux technology and application information. For details, refer to the following section. I created a text file 11. The following is the content of the text file. However, an error is displayed after running.
#! /Bin/bash
Ft ()
{
Echo "*************************"
Echo "* Main Menu *"
Echo "* 1, powroff *"
Echo "* 2, create user *"
Echo "* 3. exit *"
Echo "*************************"
}
Mu ()
{
Echo-n "Input :"
Read
Case $ a in
1)
Shutdown-h now
;;
2)
Echo-n "username"
Read u
Useradd $ u
Passwd $ u
;;
3)
Exit
;;
*)
Echo "plase input 1/2/3"
;;
Esac
}
While ['1-lt 2']
Do
Ft
Mu
Done
}
The following content is displayed after./11!
./11: line 1: 1: command not found
./11: line 35: []: command not found
Is this a function error? How should I modify it? Thank you 1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service