<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    yanmin

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      16 隨筆 :: 1 文章 :: 9 評論 :: 0 Trackbacks

    前提數據
    file: 2012-07-11Mig.csv
    內容
    project/test ,SAServicesHandler.java,N,N
    project/test,ADSLSARelocationServiceDetails.jsp ,Y,Y
    project/test,SAServicesHandler1.java,Y,N
    project/test1, SAServicesHandler.java ,N,Y
    project/test, SAServicesHandler.java ,Y,Y
    project/ test, SAServicesHandler.java   ,Y,Y

    運行命令:
    dos2unix 2012-07-11Mig.csv
    ./checkfile1.sh /home/test/2012-07-11Mig.csv  /home/test

    shell Code:

    #!/bin/sh
    #
    #   This script checks if the file name in the csv exists in the folder for deployment
    #   This script takes in two parameters
    #   First parameter is the full path to the csv file eg /home/test/2012-07-11Mig.csv
    #   Second parameter is the full path to the files for migration eg /home/test/2012-07-11Mig
    #   Check path and file has space, include new file and new path
    #
    cd  $2 #/home/test/2012-07-11 2nd variable

    #read /home/test/2012-07-11.csv file first variable

    #grep  ",N,N" $1 > existing_files.txt
    #yanmin for check all file, include new file and new path at 2012-07-12

    grep  ",*,*" $1 > existing_files.txt

    while read line   
    do   
     path=`echo $line | cut -d , -f1`
     filename=`echo $line | cut -d , -f2`
        file="$path/$filename"
        path1=$(echo $path | tr ' ' '_')
     
     # for check path and filename has space at 2012-07-12 start
     path1=$(echo $path | tr ' ' '_')
     filename1=$(echo $filename | tr ' ' '_')
     
     if [[ $path != $path1 ]]
     then
      echo "$file path has space, please check "
     fi
     
     if [[ $filename != $filename1 ]]
     then
      echo "$file file name has space, please check "
     fi
     #check path and filename has space at 2012-07-12 end
     
     if [ ! -f $file ]  
        then
         echo "$file does not exists, please check"
     fi
     
        done < existing_files.txt

    rm  existing_files.txt


     

    posted on 2012-07-12 16:48 yanmin 閱讀(861) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲精品V欧洲精品V日韩精品| 亚洲人成在线精品| 亚洲狠狠久久综合一区77777| 亚洲码一区二区三区| a级毛片免费全部播放无码| 久久夜色精品国产亚洲av| jizz中国免费| 在线免费观看一区二区三区| 亚洲一区二区三区AV无码| 好湿好大好紧好爽免费视频| 啦啦啦中文在线观看电视剧免费版| 亚洲一区日韩高清中文字幕亚洲| 亚洲精品在线视频观看| 香蕉97超级碰碰碰免费公| tom影院亚洲国产一区二区| 成人免费一区二区三区| 在线看片无码永久免费aⅴ| 亚洲av乱码一区二区三区按摩| **一级毛片免费完整视| 亚洲导航深夜福利| 久久aa毛片免费播放嗯啊| 亚洲黄色免费电影| 成人影片一区免费观看| 亚洲片国产一区一级在线观看| 一进一出60分钟免费视频| 四虎影视永久免费观看地址| 亚洲一级片免费看| 亚洲四虎永久在线播放| 和日本免费不卡在线v| 香港一级毛片免费看| 亚洲成色在线综合网站| aa级一级天堂片免费观看| 四虎影视在线看免费观看| 亚洲精品免费在线观看| 免费毛片在线播放| a成人毛片免费观看| 亚洲一区二区三区深夜天堂| 亚洲一区二区高清| 波多野结衣在线免费观看| 成人午夜影视全部免费看| 亚洲国产亚洲片在线观看播放|