Hi all,
Say i have multiple files x1 x2 x3 x4, all with common header (date, time, year, age),,
How can I merge them to one singe file "X" in shell scripting
Thanks for your suggestions.
Hi all,
Say i have multiple files x1 x2 x3 x4, all with common header (date, time, year, age),,
How can I merge them to one singe file "X" in shell scripting
Thanks for your suggestions.
try
awk '{print $0}' x1 x2 x3 x4 > X
awk 1 x[1-4] >output
cat x[1-4] >output
Header will be reapeted if you use above command, in case if you want to write header only once while merging files try this
awk 'NR == 1 || FNR > 1' x[1-4] >output