使用道具 举报
Post by ggyy_sun;1863659 这里,shell把“a b c d”都理解为四个字符了,不是你创建的文件
Post by lvcc;1863568 for.sh #!/bin/bash touch a b c for file in a b c d do echo $file done exit 0 复制代码 结果: $ ./for.sh a b c d 复制代码 for后面不是做比较吗?比较的时候同时也会附值吗? 为什么d会输出来? ps:希望不要被鄙视!
本版积分规则 发表回复 回帖后跳转到最后一页