Sample Header Ad - 728x90

sort --check: continue past first disorder

2 votes
1 answer
755 views
I would like to get a list of all the places in a large file where the keys decrease from a previous line. I can check if the file is sorted using sort: sort -cns -k1.14,1.15 -k1.1,1.10 file.txt But it only tells me about the first failure to be sorted (sort: file.txt:42: disorder: .) Can I get it to continue, and tell me about further disorders in the file?
Asked by Nick Matteo (1617 rep)
Nov 28, 2016, 11:40 PM
Last activity: Oct 13, 2024, 07:19 PM