美文网首页
Bash if 语句相关

Bash if 语句相关

作者: lucientlau | 来源:发表于2018-04-02 21:01 被阅读0次
    for filename in `ls $foldpath`
    do
      if [[  $filename =~ .*_raw_.*\.csv  ]] # find the file with name like 'sss_raw_df.csv'
      then 
        #do process
      fi
    done
    
    if [ -d $filepath ] #check if the filepath is a fold
    if [ -f $filepath ] # check if the filepath is a file
    if [ -e $filepath ] # check if the path is exist
    
    

    相关文章

      网友评论

          本文标题:Bash if 语句相关

          本文链接:https://www.haomeiwen.com/subject/idxfhftx.html