Missing data

Gents,

Using the following code.

awk -F: 'BEGIN {
print "Time,FFID,Swath,Line,Point";
}
/(SCI TB Timestamp Local : |File # :|Swath Name :|Tape # :|Line Name :|Point Number :|Type_Of_Dump|Type_Of_Test|Tape_Nb|Tape_Label|Date|Hist)/{
sub("^[ \t]*","",$2);sub("[ \t]*$","",$2); if($1 ~ /Hist/) { printf "%s\n", $2; } else { printf "%s,", $2; }
} ' File_1.txt 

File_1.txt ( attached )
I got this output

Time,FFID,Swath,Line,Point
11/28/15 3,21,2975,7733,41711.0,49169.0,N/A
11/28/15 3,22,2975,7733,41701.0,47993.0,N/A
11/28/15 3,23,2975,7733,41279.0,48881.0,N/A

Please how i can get the following output

11/28/15 3:07:16.273 PM,21,2975,7733,41711.0,49169.0,N/A
11/28/15 3:07:17.921 PM,22,2975,7733,41701.0,47993.0,N/A
11/28/15 3:07:21.773 PM,23,2975,7733,41279.0,48881.0,N/A

Thanks for your help :b:

Hello jiam912,

Could you please try following and let me know if this helps.

awk -F" : " 'BEGIN{print "Time,FFID,Swath,Line,Point"} /SCI TB Timestamp Local/{A=$NF} /File #/{A=A?A OFS $NF:$NF} /Swath Name/{A=A?A OFS $NF:$NF} /Tape #/{A=A?A OFS $NF:$NF} /Point Number/{A=A?A OFS $NF:$NF} /Line Name/{A=A?A OFS $NF:$NF;} /Type of Test/{A=A? A OFS $NF:$NF;print A;A=""}' OFS=,   Input_file
 

Output will be as follows.

Time,FFID,Swath,Line,Point
11/28/15 3:07:16.273 PM,21,2975,7733,41711.0,49169.0,N/A
11/28/15 3:07:17.921 PM,22,2975,7733,41701.0,47993.0,N/A
11/28/15 3:07:21.773 PM,23,2975,7733,41279.0,48881.0,N/A
 

Thanks,
R. Singh

R. Singh
Works many thanks