<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)  編輯  收藏

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


    網站導航:
     
    主站蜘蛛池模板: 亚洲另类少妇17p| 亚洲一区二区三区亚瑟| 外国成人网在线观看免费视频 | 成人毛片免费观看视频在线| 爱情岛论坛亚洲品质自拍视频网站| 中文字幕不卡亚洲| 久久久高清免费视频| 黄色免费在线观看网址| 亚洲国产一区二区三区青草影视| 大学生美女毛片免费视频| 亚洲一区二区三区免费| 亚洲一区在线视频| 亚洲综合最新无码专区| 久久不见久久见中文字幕免费 | 91青青国产在线观看免费| 在线播放亚洲精品| 亚洲国产成人精品电影| 久久久久亚洲爆乳少妇无 | 91精品免费高清在线| 男女污污污超污视频免费在线看| 亚洲视频免费观看| 亚洲国产天堂久久综合| 日韩免费一区二区三区在线| 两性色午夜视频免费播放| 亚洲午夜精品一区二区麻豆| 亚洲嫩草影院久久精品| 亚洲免费在线观看| 永久中文字幕免费视频网站| 亚洲免费视频观看| 中文字幕不卡高清免费| 免费观看亚洲人成网站| 亚洲一区二区三区不卡在线播放| 久久久亚洲精品无码| 亚洲日韩在线观看免费视频| 日韩在线免费电影| 最近中文字幕mv手机免费高清| 97青青草原国产免费观看| 免费久久人人爽人人爽av| 日亚毛片免费乱码不卡一区 | 亚洲一区二区三区在线观看蜜桃 | 内射无码专区久久亚洲|