On 10/16/23 08:35, Dani Moncayo wrote:
On Mon, Oct 16, 2023 at 8:19 AM Dani Moncayo <dmonc...@gmail.com> wrote:

Maybe someone could figure out a better way of specifying several
field-delimiters.

Perhaps a long option, like:

If (and only if) such a feature would be added, then it would make sense
to generically solve the problem.

The sort keys are usually directly bound to the corresponding delimiter.

Using the initial example:

  SUSE 10.2 12/7/2006

In natural language, the problem could be described as:
  - with ' ' as the delimiter,
  - take the 3rd field,
  - there, with '/' as delimiter,
  - sort by key 3, 1 and 2 numerically.

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?

Have a nice day,
Berny

Reply via email to