The ifelse statement in Shell shows how to learn little shell quietly. today I see ifelse Hello ~ The following script is used to judge the parameters of the script executed by the user. if it is hello, it will show howareyou. if there is nothing, it will prompt you to enter the parameter. if it is not hello, it will prompt you to enter... the if else statement in Shell shows how to learn little shell quietly. today we can see if else Hello ~ The following script is used to judge the parameters of the script executed by the user. if it is hello, it will show how are you. if there is nothing, it will prompt you to enter the parameter if it is not hello, it is easy to enter the hello code ~ #! /Bin/baslif ["$1" = "hello"]; thenecho how are you! Elif ["$1" = ""]; thenecho please input parameterelseecho please input hellofi you need to note that the following fi should not forget to write ~ I forgot to write for the first time ..
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.