The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 06-05-2008
mondrar mondrar is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 3
I was able to get it done, the long way. Yes, I know, it looks funny.

awk -F"," '{ if ($6 = 475) print $1 "," "@@"$3 "," $6 "," $10 "," $8}' ${DIR1}${INFILE} | sed -e 's/.*\(200.\{5\}\)00000000.*/\1/g' -e 's/^..\(..\)\(..\)\(..\)/\2\3\1/g' | sed -e 's/@@1//g' | sed -e 's/\.//g' | awk -F"," ' { print $2 " " "0000" $4 "0" $1 "00000000" $5}' > ${DIR2}${TPRFILE}