I need to sort a CSV file, but the the header row (1st row) keeps getting sorted.
This is what I'm using:
cat data1.csv | sort -t"|" -k 1 -o data1.csv
Here's a sample line:
Name|Email|Country|Company|Phone
Brent Trujillo|tempus@mauris.org|Burkina Faso|Donec LLC|(612) 943-0167
Asked by Frank Wilson
(89 rep)
Nov 29, 2014, 09:05 PM
Last activity: Jun 25, 2017, 01:03 AM
Last activity: Jun 25, 2017, 01:03 AM