3 ms·
No one gives a shit about cut. $ man 1 cut
by ngcazz 12y ago
No one gives a shit about cut.
$ man 1 cut
- mprovost 12y agoI'm always surprised when people recommend awk for pulling delimited sections of lines out of a file, cut is so much easier to work with.
- ciupicri 12y agoThat's because cut sucks when fields can be separated by multiple space or tab characters. # printf '1 2\t3' | cut -f 2 3 # printf '1 2\t3' | awk '{print $2}' 2 # printf '1 2\t\t3' | cut -f 2 # printf '1 2\t\t3' | awk '{print $2}' 2
- deleted 12y ago[deleted]
- vram22 12y agopaste and join are useful too; paste complements cut, and join is like the SQL join, but for text files.