coslyk
deepin
2016-08-01 03:34 - for i in {1..7}; do
- if [ $i -eq 5 ]; then
- echo ok
- fi
- done
Reply Like 0 View the author
https://bbs.deepin.org/post/41942
1.sh: 2: [: Illegal number: {1..7}
https://bbs.deepin.org/post/41942
for i in {1..7} 是比较新的语法,bash 3.0才有,你试下
https://bbs.deepin.org/post/41942
解决了,但是需要把shell改为bash,方法:http://blog.sina.com.cn/s/blog_985bedb401015vrl.html
非常感 ...
https://bbs.deepin.org/post/41942
其实开头带上 #!/bin/bash就好
Popular Ranking
ChangePopular Events
More