Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- down=${1}
- outputfile=temp_output_cables.out
- inputfile=temp_input_cables.out
- archivefile=cablegate-201012041811.7z
- # download transaction list
- python jean_b.py 691dd277dc0e90a462a3d652a1171686de49cf19067cd33c7df0392833fb986a temp_transaction
- tail -n 130 temp_transaction > $inputfile
- rm -fv $outputfile
- touch $outputfile
- # download transactions to single files
- while read -r line; do
- tempFile=temp_trans_$line.out
- if [ -f $tempFile ];then
- echo "found $line as tempFile"
- else
- #echo "MISSING output for $line..."
- echo "downloading $line..."
- python jean_b.py $line $tempFile
- fi
- done < $inputfile
- # pipe single files to one
- while read -r line; do
- echo "piping $line"
- tempFile=temp_trans_$line.out
- if [ -f $tempFile ];then
- cat $tempFile >> $outputfile
- else
- echo "MISSING output for $line..."
- exit 1
- fi
- done < $inputfile
- # cleanup
- rm -fv temp_trans_*.out
- mv $outputfile $archivefile
- 7z x -oCableGate $archivefile
- echo "done! see folder CableGate"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement