摘要:        
写了一个查找某种类型的文件的脚本,代码如下:(代码实现是查找后缀名为.c的文件)#!/bin/bash# get the number of functions in RTS code# $1是运行脚本时,输入的第一个参数,这里指的是使用者希望搜索的目录# 下面的代码是对目录进行判断,如果为空则使用脚本所在的目录;否则,搜索用户输入的目录if [[ -z "$1" ]] || [[ ! -d "$1" ]]; then echo "The directory is empty or not exist!" echo "It     阅读全文
posted @ 2012-09-16 14:46
朝雾之归乡
阅读(5009)
评论(2)
推荐(0)
        
 
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号