摘要: linux多线程编程 参考:https://blog.csdn.net/weibo1230123/article/details/81410241 https://blog.csdn.net/skyroben/article/details/72793409 1.背景知识 Linux没有真正意义上的 阅读全文
posted @ 2019-03-26 21:29 dallywang 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 要求:写一个linux bash脚本来查看目标文件夹下所有的file和directory,并且打印出他们的绝对路径。 运行command:./myDir.sh input_path output_result 要求输出格式为: 代码思路: BFS遍历,数据结构为queue,数组实现。 代码实现: 写 阅读全文
posted @ 2019-03-06 22:25 dallywang 阅读(959) 评论(0) 推荐(1) 编辑
摘要: 1. 判断shell里判断字符串是否包含某个字符 a. 可以用正则式匹配符号 “=~” 举例:str="this is a string" 要想在判断str中是否含有"this"这个字符串,下面的语句是可行的 [[ $str =~ "this" ]] && echo "\$str contains 阅读全文
posted @ 2019-03-06 22:24 dallywang 阅读(788) 评论(0) 推荐(0) 编辑