#DFIR tip: When dealing with CSV files, you can usually avoid Excel & custom scripts when just filtering for particular columns: $ echo "a,b,c,d,e" | cut -d , -f 1,2 a,b $ echo "a,b,c,d,e" | cut -d , -f 1-3,5 a,b,c,e $ echo "a,b,c,d,e" | cut -d , -f 3- c,d,e
16
28
2
117
Replying to @attrc
Also, sort allows you to sort (and even uniq-ify) on columns: sort -t, -k2,2rn -k5,5 input.csv Gives you a reverse numeric sort on column 2 with a secondary alpha sort on column 5

Mar 30, 2021 · 4:01 PM UTC

4
6
32
Replying to @hal_pomeranz @attrc
Sort a list of unique IP numbers: sort -u -n -t . -k1,1 -k2,2 -k3,3 -k4,4 -o ips.srt ips.lst
1
Replying to @hal_pomeranz @attrc
Was coming here to say this. Most of the time when I am using cut I need to sort as well.
learning the syntax for sort -k was a life changer.