Changeset 12871 for trunk/DataCheck/Archive/rawIngest.sh
- Timestamp:
- 02/08/12 12:33:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Archive/rawIngest.sh
r12750 r12871 4 4 destFolder=$2 5 5 6 if [ "$#" != " 2" ]6 if [ "$#" != "3" ] 7 7 then 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" 9 9 exit 10 10 fi … … 19 19 then 20 20 echo "Dest folder is empty. Aborting" 21 exit 22 fi 23 24 if [ $3 == "" ] 25 then 26 echo "Identifier for log files empty. Aborting" 21 27 exit 22 28 fi … … 61 67 destFolder=${destFolder%/} 62 68 echo "Will start ingesting files from "$sourceFolder" to "$destFolder 69 echo "Will start ingesting files from "$sourceFolder" to "$destFolder >> Rawreport$3.txt 63 70 64 71 #list all the files in sourceFolder, and copy then with the same structure to destfolder … … 87 94 if [ -a $targetFile".gz" ] 88 95 then 89 echo "File $targetFile already exist. Skipping it" >> Rawreport .txt96 echo "File $targetFile already exist. Skipping it" >> Rawreport$3.txt 90 97 continue 91 98 fi … … 100 107 # then 101 108 102 repairRawFile.sh $interFile RawENDerrors .txt RawMJDerror.txt Rawreport.txt RawprocessErrors.txt109 repairRawFile.sh $interFile RawENDerrors$3.txt RawMJDerror$3.txt Rawreport$3.txt RawprocessErrors$3.txt 103 110 104 111 if [ -a $interFile ] 105 112 then 106 fixRawKeyWords.sh $interFile RawreportTwo .txt RawprocessErrors.txt113 fixRawKeyWords.sh $interFile RawreportTwo$3.txt RawprocessErrors$3.txt 107 114 result=`fverify $interFile 2>/dev/null | grep '0 error(s)'` 108 115 if [ "$result" == "" ] 109 116 then 110 echo "$interFile" >> RawstillHasProblems .txt117 echo "$interFile" >> RawstillHasProblems$3.txt 111 118 rm $interFile 112 119 else 113 gzip $interFile120 gzip -1 $interFile 114 121 cp $interFile".gz" $targetFile".gz" 115 122 rm $interFile".gz"
Note:
See TracChangeset
for help on using the changeset viewer.