码迷,mamicode.com
首页 > 系统相关 > 详细

shell 遍历所有文件包括子目录

时间:2017-02-03 16:50:30      阅读:299      评论:0      收藏:0      [点我收藏+]

标签:变量   ted   留空   编辑   ror   比较   img   引用   .com   

1.代码简单,但是难在校验,不像python那么好理解

建议在Notepad++下编辑。

2.注意引用linux命令的`是【tab】键上面那个

3.if[] 这里

Error :  syntax error near unexpected token `then‘

原因: 条件语句 [ 符号的两边都要留空格

技术分享

2.1 空格

a.定义变量时, =号的两边不可以留空格

b.if语句 [ 符号的两边都要留空格

c.字符串比较, =两边要留空格

d. if 和then 在同一行 要加;

shell 遍历所有文件包括子目录

标签:变量   ted   留空   编辑   ror   比较   img   引用   .com   

原文地址:http://www.cnblogs.com/alamZ/p/6362735.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!