SHARE
TWEET

Untitled

a guest Sep 19th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Record_Count=`wc -l < ${Source_Dir}/${Output_File_Name} | tr -d " "`
  2. Actual_Record_Count=`expr ${Record_Count} - 1`
  3.    
  4. echo ${Bus_date} >${Target_Dir}/${Output_File_Name}
  5.    
  6. cat ${Source_Dir}/${Output_File_Name} >> ${Target_Dir}/${Output_File_Name}
  7.    
  8. echo "EOF${Actual_Record_Count}" >>${Target_Dir}/${Output_File_Name}
  9.    
  10. awk -v head="$Bus_date" 'BEGIN { print head } { print } END { print "EOF" NR-1 }' "$Source_Dir/$Output_File_Name" >"$Target_Dir/$Output_File_Name"
  11.    
  12. BEGIN { print head }
  13.       { print }
  14. END   { print "EOF" NR-1 }
RAW Paste Data
Top