linux ShellScript
Agent_xidi
这个作者很懒,什么都没留下…
展开
-
linux shell 之xargs 的简单使用
16:34 xargs将标准输入的参数转换成命令行参数。xargs命令应紧跟在管道命令之后。 例如: Command |xargs 示例: 查找当前目录下内容包含字符串“main”的文件 $ ls |xargs grep 'main' 删除后缀名为txt的文件 $ find . -type f-name "*.txt" -print0 | xargs -0 rm -f -0 将翻译 2012-12-21 16:51:16 · 797 阅读 · 0 评论 -
linux shell 之数组操作
Regular arrays are arrays which can use onlyintegers as its array index. But associativearrays are arrays which can take a string as its array index. array_var=(1 2 3 4 5 6) #Values will be s原创 2012-12-21 00:25:13 · 414 阅读 · 0 评论 -
linux shell 之 grep简单使用
一、搜寻特定字符串 1)普通查找 grep -n 'the'regular_express.txt 2)反向选择 grep -vn 'the'regular_express.txt 3)忽略大小写 grep -in 'the'regular_express.txt 二、利用中括号[] 来搜寻集合字符 搜寻 test OR taste转载 2012-12-21 12:17:16 · 911 阅读 · 0 评论