file parsing

hi experts,

i have two files as fileA and fileB

fileA

"assembly_warehouse";"product_code";"sequence_number";"expiry_date";"component_whouse";"component_code"
"01";"3013000005 ";"0030";"2099/12/31";"01";"1001110002 "
"01";"3013000005 ";"0040";"2099/12/31";"01";"1001120002 "
"01";"3013000005 ";"0050";"2099/12/31";"01";"1001130001 "
"01";"3013000005 ";"0060";"2099/12/31";"01";"1013020005 "

fileB

[SIZE=2]"assembly_warehouse","product_code","sequence_number","expiry_date"
[SIZE=2]"01","3013000005 ","0030",2099-12-31 00:00:00
[SIZE=2]"01","3013000005 ","0040",2099-12-31 00:00:00
[SIZE=2]"01","3013000005 ","0050",2099-12-31 00:00:00
[SIZE=2]"01","3013000005 ","0060",2099-12-31 00:00:00

can you please give an idea to make a format file which is used to output a file from datafile fileA which is similar to fileB.

please help me regarding the same.

Thanks in advance.

Subhendu
[/SIZE][/SIZE][/SIZE][/SIZE][/SIZE]

This looks like an assignment..

man awk

you can try this!!!

awk -F";" '/\//{gsub("/","-",$4)}NR==1{print $1","$2","$3","$4}NR>1{print $1","$2","$3","$4"00:00:00"}' filename|awk -F"," 'BEGIN{OFS=","}NR>1&&$4 ~ /\"/{gsub("\""," ",$4)}{print $0}'