I have a script to sort respect to certain column in a for loop. I would like to skip the header in the sorting process but I’m failing. This is what I have:
for i in file*
do
sort -k 1,1 -k 3,3n -t\; ${i} > h${i}
rm ${i}
done
How to skip the the header in the sorting process but keep it in the output?
Thanks.
Is header the first line of the file?
If it is, try next one: