Hi I need to merge 4 files. The issue i am facing is all the files have headers and i do not want them in the final output file. Can anybody suggest how to do it?
try
for FILE in *
do
exec 5<"$FILE"
read LINE <&5
[ -z "$FIRST" ] && echo "$LINE"
FIRST="no"
cat <&5
exec 5<&-
done > merged.file
can i have a awk one liner for this?
try:
awk 'FNR>1' file1 file2 file3 file4 > new_file
awk -v var=`wc -l < files ` 'NR>1 && /Header row/ {next}{print}' files
Thanks very much for the answers . sorry for late response i just came back from office.