![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell编程
Bulid_graph
这个作者很懒,什么都没留下…
展开
-
(转)shell编程实例
转载出处:https://blog.csdn.net/lile269/article/details/6658885 1.查找当前目录中所有大于500M的文件,把这些文件名写到一个文本文件中,并统计其个数。 find ./ -size +500M -type f | tee file_list | wc -l 2.在目录/tmp下找到100个以abc开头的文件,然后把这些文件的第一行保存到文件new中。 for filename in find /tmp -type f -name "abc*转载 2020-07-31 22:46:30 · 450 阅读 · 0 评论 -
shell编程实例
http://www.macs.hw.ac.uk/~hwloidl/Courses/LinuxIntro/x864.html (1)使用for循环替代wc -l指令 #!/bin/bash exec 10<&0 #注意空格 exec < $1 in=$1 file="current.txt" let count=0 while read line;do ((count++)) echo $line > $file if [ $? -ne 0 ]; then e原创 2020-07-31 22:33:36 · 186 阅读 · 0 评论 -
linux-shell编程实例(1)
题目来源:http://www.macs.hw.ac.uk/~hwloidl/Courses/LinuxIntro/x864.html原创 2020-07-31 21:51:24 · 102 阅读 · 0 评论