[Linux] I just learned shell and encountered a problem. The total error occurred during execution: Unexpected Operator
Source: Internet
Author: User
I just learned shell and encountered a problem. The total error occurred during execution: Unexpected
Operator. I used Ubuntu 9. 04. I learned from laruence to go to the shell script section,
But it is correctly executed in the fedora 11 System of the VM.
The solution cannot be found online.
Have you encountered the same problem,
Thank you first
Solution: solve the problem on the Ubuntu Chinese forum.
Because the default SH of Ubuntu is connected to dash, and the dash and bash are incompatible, an error occurs. during execution, you can replace sh with the bash file name. sh to execute. successful. dash is something. After checking it, it should also be a shell, which seems to be a lot of criticism from users.
By the way, modify sh to connect to bash by default:
Sudo dpkg-reconfigure dash
Select No.
Reference: http://hi.baidu.com/nako521/blog/item/248fee953b52454fd1135eb7 . Html
I do not know whether the summary is accurate. If any error occurs, please correct me.Reprinted: http://blog.sina.com.cn/s/blog_63484d2d0100mdfn.html
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.