随笔分类 -  Linux_Shell

Linux_Shell
摘要:ubuntu下,批量更改文件后缀:eg:把当前目录下以tpl为后缀的文件全部rename为html a.tpl b.tpl c.tpl执行命令: rename 's/\.tpl/.html/' *.tpla.html b.html c.html 阅读全文
posted @ 2015-11-11 21:04 茶陵后 阅读(411) 评论(0) 推荐(0)
摘要:原文出自:http://blog.csdn.net/gogdizzy/article/details/6576474sort命令-t指定分隔符号如果不指定,默认以空格为分隔,且忽略首尾空格;如指定,则只可识别一个字符,如果这个字符是空格,那么不忽略首尾空格。例如,有一行内容是" X ",不指定参数,... 阅读全文
posted @ 2015-06-23 16:03 茶陵后 阅读(228) 评论(0) 推荐(0)
摘要:1 #!/bin/bash 2 3 for file in $TEST*/; 4 do 5 echo "-------------" 6 pwd 7 echo "-------------" 8 cd $file 9 pwd10 echo "-------------"11 echo './go'12 cd ..13 ... 阅读全文
posted @ 2013-12-07 13:14 茶陵后 阅读(655) 评论(1) 推荐(0)