Ignore:
Timestamp:
02/08/12 12:33:48 (13 years ago)
Author:
lyard
Message:
added more scripts
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Archive/rawIngest.sh

    r12750 r12871  
    44destFolder=$2
    55
    6 if [ "$#" != "2" ]
     6if [ "$#" != "3" ]
    77then
    8         echo "Please specify source and dest folders. Aborting"
     8        echo "Please specify source and dest folders. and an identifier for the log files Aborting"
    99        exit
    1010fi
     
    1919then
    2020        echo "Dest folder is empty. Aborting"
     21        exit
     22fi
     23
     24if [ $3 == "" ]
     25then
     26        echo "Identifier for log files empty. Aborting"
    2127        exit
    2228fi
     
    6167destFolder=${destFolder%/}
    6268echo "Will start ingesting files from "$sourceFolder" to "$destFolder
     69echo "Will start ingesting files from "$sourceFolder" to "$destFolder >> Rawreport$3.txt
    6370
    6471#list all the files in sourceFolder, and copy then with the same structure to destfolder
     
    8794        if [ -a $targetFile".gz" ]
    8895        then
    89                 echo "File $targetFile already exist. Skipping it" >> Rawreport.txt
     96                echo "File $targetFile already exist. Skipping it" >> Rawreport$3.txt
    9097                continue
    9198        fi
     
    100107#       then
    101108               
    102         repairRawFile.sh $interFile RawENDerrors.txt RawMJDerror.txt Rawreport.txt RawprocessErrors.txt
     109        repairRawFile.sh $interFile RawENDerrors$3.txt RawMJDerror$3.txt Rawreport$3.txt RawprocessErrors$3.txt
    103110       
    104111        if [ -a $interFile ]
    105112        then
    106                 fixRawKeyWords.sh $interFile RawreportTwo.txt RawprocessErrors.txt
     113                fixRawKeyWords.sh $interFile RawreportTwo$3.txt RawprocessErrors$3.txt
    107114                result=`fverify $interFile 2>/dev/null | grep '0 error(s)'`
    108115                if [ "$result" == "" ]
    109116                then
    110                         echo "$interFile" >> RawstillHasProblems.txt
     117                        echo "$interFile" >> RawstillHasProblems$3.txt
    111118                        rm $interFile
    112119                else
    113                         gzip $interFile
     120                        gzip -1 $interFile
    114121                        cp $interFile".gz" $targetFile".gz"
    115122                        rm $interFile".gz"
Note: See TracChangeset for help on using the changeset viewer.