php - shell script cannot find directory or file
欧阳克
欧阳克 2017-06-20 10:07:44
0
3
882

Execute shell script on linux

But when executed, it displays

The directory does exist. what happened? ?

欧阳克
欧阳克

温故而知新,可以为师矣。 博客:www.ouyangke.com

reply all(3)
洪涛

When assigning values ​​to bash variables, there cannot be spaces on both sides of the equal sign. It should be written as:

dir=/webserver/test/
typecho

dir =/web...
There can be no spaces on the left and right sides of the equal sign

女神的闺蜜爱上我

Don’t add a space after dir

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!