2
$ ls -l | sort -k 5 -n -r
$ ls -l | sort -k5nr
I find out these two command generate the same output.
But I don't understand why I can combine 5
with n
?
Why not a syntax error?
edit:
$ ls -l | cut -d: -n -f 2
$ ls -l | cut -d:nf2
cut: the delimiter must be a single character
Try `cut --help' for more information.
Why cut
dose not behave like sort
?
does
sort
follow the general rule?cut
doesn't work that way. – kev – 2011-12-24T08:16:41.607@kev Added additional explanation to my answer. – Daniel Beck – 2011-12-24T19:38:18.913