[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'sort' command -- support more than one field-delimiter

From: Dani Moncayo
Subject: Re: 'sort' command -- support more than one field-delimiter
Date: Wed, 18 Oct 2023 16:55:23 +0200

On Wed, Oct 18, 2023 at 1:48 PM Bernhard Voelker
<> wrote:
> [...]
> Therefore, melting the delimiters into a list like ...
> > $ sort --field-separators=" /" -n -k5 -k3 -k4 file1.txt
> ... would not tell correctly which keys to sort by, would it?

Indeed, that'd be a pretty bad approach, as I said earlier in this thread.

My last try: Give an option for specifying an _explicit_and_ordered_
list of separators. Something like:

$ sort --field-separators="  //" -n -k5 -k3 -k4 file1.txt
(i.e. two spaces and two slashes, in that order).

Anyway, I don't feel strongly about the convenience of adding a new
option, for a use-case that seems infrequent in real life.

Dani Moncayo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]