Filename1.xml NO 2012-11-16 02:00:27 20121115/pathname/ asia
Filename1.rec YES 2012-11-16 01:20:24 20121115/pathname asia
FIleName2.xml YES 2012-11-16 01:20:25 20121115/pathaname asia
if the file content are properly filled, then below one works fine well with out any other fancy stuff like - or NOT ARRIVED YET
PS: a="02:00:00"
cat aa | awk -v var="$a" '{split($5,a,"/") ; printf ("%8d %15s %60s %10s %10s %5s\n", a[1],$6,$1,var,$4,$2)}'
so I have my desired o/p
20121115 asia Filename1.xml 02:00:00 02:00:27 NO
20121115 asia Filename1.rec 02:00:00 01:20:24 YES
20121115 asia FIleName2.xml 02:00:00 01:20:25 YES
if the content changed a bit, in addition to the existing above records
FIleName3.xml - - NOT ARRIVED YET asia
FileNamee3.rec - - NOT ARRIVED YET asia
Filename1.xml NO 2012-11-16 02:00:27 20121115/pathname/ asia
Filename1.rec YES 2012-11-16 01:20:24 20121115/pathname asia
FIleName2.xml YES 2012-11-16 01:20:25 20121115/pathaname asia
Then how can I change have my desired o/p as below
20121115 asia Filename3.xml 02:00:00 - -
20121115 asia Filename3.rec 02:00:00 - -
20121115 asia Filename1.xml 02:00:00 02:00:27 NO
20121115 asia Filename1.rec 02:00:00 01:20:24 YES
20121115 asia FIleName2.xml 02:00:00 01:20:25 YES
PS: In the o/p file first column will be date which derived from PATH-NAME with DATE from input file and input file could have mix of NOT ARRIVED YET AND PATH with DATE values . PATH with DATE will be always same thru-out the file.