[TriLUG] Re: bash script - join question

Shawn Hood shawnlhood at gmail.com
Tue Oct 24 15:01:59 EDT 2006


Not when you also have entries that have two digits, like INT10.  That
screws up the sort, so I have to cut the INT out of the file and then
sort -g.  PITA.

On 10/24/06, Ron Yorgason <ron at tritechs.net> wrote:
> I don't see a convenient way to do it without sorting, but sorting the
> files is really easy:
>
> sort file1 > sort1; sort file2 > sort2; join sort1 sort2
>
> That gave me the output:
> INT1 00:14:5e:1d:cb:0e 10.40.21.1
> INT3 00:14:5e:1d:bb:c2 10.40.21.3
> INT9 00:11:25:fe:ab:c6 10.40.21.9
>
>
> Shawn Hood wrote:
> > Seems as if the key on which the files are joined must be in order
> > within both files.  Any ways around this without sorting?
> >
> > Shawn
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>


-- 
Shawn Hood
(910) 670-1819 Mobile



More information about the TriLUG mailing list