coreutils
[Top][All Lists]
Advanced

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

Re: suggestion: sort with case-insensitive


From: Bernhard Voelker
Subject: Re: suggestion: sort with case-insensitive
Date: Fri, 27 Nov 2020 17:59:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 11/25/20 11:17 AM, t_liang wrote:
> Like MacOS Finder app, sort by name, the rule is: version-sort and 
> case-insensitive(if the file system is case-insensitive)

Your suggestion is very vague, and actually not even one full sentence.
If it's about 'sort' from GNU coreutils, then I can say it already supports 
both sorting by version and case-insensitive:

  $ sort --help  | grep -E 'ignore-case|version-sort'
  -f, --ignore-case           fold lower case to upper case characters
  -V, --version-sort          natural sort of (version) numbers within text

and even the combination of both at the same time:

  $ printf '%s\n' 1.0a 1.0B 1.0c | sort -Vf
  1.0a
  1.0B
  1.0c

It's about the typical questions:
- What do you want to achieve?
- How do you attempt to achieve it? Reproducer: command line, input, ...
- What was the expected outcome?
- What was the actual outcome?
- What is the suggested change?

Have a nice day,
Berny




reply via email to

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