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

Re: feature request: -0 option for tr

2009-06-28 Thread Craig Sanders
On Sat, Jun 27, 2009 at 09:26:17PM -0600, Eric Blake wrote: According to Craig Sanders on 6/27/2009 7:20 PM: please add a -0 option to tr, which is equivalent to running: tr '\n' '\000' Why should we burn an option letter, when it is not that much more typing to get what you

Re: feature request: -0 option for tr

2009-06-28 Thread Bob Proulx
Craig Sanders wrote: Eric Blake wrote: According to Craig Sanders: please add a -0 option to tr, which is equivalent to running: tr '\n' '\000' Why should we burn an option letter, when it is not that much more typing to get what you wanted anyways? because it's a

Re: feature request: -0 option for tr

2009-06-28 Thread Andreas Schwab
Craig Sanders c...@taz.net.au writes: GNU grep has -z and -Z options - by your reasoning above, these convenience options are completely unecessary because you can easily run tr '\0' '\n' before grep and tr '\n' '\0' after grep. No, you can't. The combination of these two operations is not

Re: feature request: -0 option for tr

2009-06-28 Thread Craig Sanders
On Sun, Jun 28, 2009 at 08:27:20PM +0200, Andreas Schwab wrote: Craig Sanders c...@taz.net.au writes: GNU grep has -z and -Z options - by your reasoning above, these convenience options are completely unecessary because you can easily run tr '\0' '\n' before grep and tr '\n' '\0' after