Re: sort and multiple -k options

2009-06-28 Thread Andreas Schwab
Mike Frysinger vap...@gentoo.org writes: i want to have the files sorted by (1) path then (2) file name then (3) cfg order. so i use this: sort -t% -k2 -k4 -k3 Your sort keys overlap. A sort key that is a proper subset of another one never changes the resulting sort order, and is thus

Re: sort and multiple -k options

2009-06-28 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Andreas Schwab on 6/28/2009 2:28 AM: i want to have the files sorted by (1) path then (2) file name then (3) cfg order. so i use this: sort -t% -k2 -k4 -k3 Your sort keys overlap. -k, --key=POS1[,POS2] start a key at POS1