![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell脚本
文章平均质量分 61
susanna123
这个作者很懒,什么都没留下…
展开
-
脚本替换
#!/bin/bashfunction print_log{ echo "[$(date +'%Y-%m-%d:%H:%M:%S')]: $@" >&2 return 0}if [ $# -ne 2 ]then echo "Usage: sh $0 blockid_file snapshot_xml" exit 1fiblockid_file=$转载 2014-06-05 15:35:53 · 482 阅读 · 0 评论 -
bash 递归遍历文件夹
#!/bin/shlist_dir(){for file in $1/*doif [ -d $file ]then echo $filelist_dir $fileelif [ -f $file ]thenecho $filefidone}if [ $# = 0 ]thenecho at least 1 arguments转载 2014-05-27 21:25:41 · 564 阅读 · 0 评论