您的位置:首页 > 运维架构 > Shell

shell出错test_path: command not found

2016-07-29 10:24 489 查看
1 #!/bin/bash

  2

  3 test_path = /alidata/myfile

  4 echo $(ls $test_path)

  5 for i in $(ls $test_path)

  6

  7 do

  8 echo i

  9 done

./test.sh

./test.sh: line 3: test_path: command not found

for.sh hello.sh name.sh test.sh www

i

i

i

i

i

自己检查发现变量跟等号中间有个空格,当成了命令
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐