Re: [Nolug] sort

From: Jimmy Hess <mysidia_at_gmail.com>
Date: Thu, 5 Sep 2013 18:13:03 -0500
Message-ID: <CAAAwwbXZzKB9VY8rk082gYNrce4HENbiHmEaCY9qm=hubN-T8A@mail.gmail.com>

Let's break it down:

 -t : means use : as the field delimeter instead of a "blank" or
space as the field separator

+1 means sort on the second field.

$fname is the filename of course

For example

INPUT: create file example.txt
k:z
i:e
h:c
b:d
a:f
a:a

OUTPUT:
:~# sort -t : +1 example.txt
a:a
h:c
b:d
i:e
a:f
k:z
:~#

OUTPUT:
:~# sort -t : +0 example.txt
a:a
a:f
b:d
h:c
i:e
k:z
:~#

--
-J
On Thu, Sep 5, 2013 at 11:09 AM, Diann Smith <diann170@gmail.com> wrote:
> could someone please tell me what sort -t : +1 $fname -  what the +1
> means.  i got the -t : part , but when I google sort +1 no good answers.
>
> thanks
> Barbara
>
-- 
-Mysid
___________________
Nolug mailing list
nolug@nolug.org
Received on 09/05/13

This archive was generated by hypermail 2.2.0 : 09/06/13 EDT