I have the following command:
sort FILENAME -u >> FILENAME-2
What it is meant to do is DEDUP AND SORT. However, my files have a one line header at the top; EX.
Email,Fname,Lname
rvalleriani@test.com,Chris,Valler
test@test.com,Mike,Liuk
m@m.com,Maurico,Hammer
The above command will randomize everything including the first line, which it shouldn't do!!
I was told to try this:
tail +2 FILENAME| sort FILENAME -u >> FILENAME-2
However, this doesn't seem to work either.
Any suggestions?
sed -n '2,$p' FILENAME | sort -u > FILENAME2