[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sort option: -n or -g
From: |
Greg Wooledge |
Subject: |
Re: sort option: -n or -g |
Date: |
Mon, 15 Nov 2021 18:47:47 -0500 |
On Mon, Nov 15, 2021 at 06:27:04PM -0500, Lawrence Velázquez wrote:
> On Mon, Nov 15, 2021, at 6:17 PM, Budi wrote:
> > What is difference sort option :
> >
> > -n and -g
> >
> > ?
> > It's bit confusing to have too detail but not adequate documentation
>
> https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html#index-numeric-sort
>
> https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html#index-general-numeric-sort
It's also worth noting:
1) sort(1) is not part of bash. It's an external program. We can advise
you, but this is not the primary support list for any implementations
of sort.
2) The POSIX spec for sort doesn't contain a -g option. That's an
extension provided by your local sort implementation. Your local
implementation is *probably* GNU, but only you would know this for
certain.
3) GNU projects often do not put full documentation into their man pages.
In the case of GNU sort, the man page says this at the end:
Full documentation <https://www.gnu.org/software/coreutils/sort>
or available locally via: info '(coreutils) sort invocation'
So, you might want to look in those places as well as the man page.