sort problems

Frederick M. Avolio avolio at grendel.UUCP
Mon Jan 21 10:40:24 AEST 1985


> Okay you sort experts why do these two sorts not work ?
> sort << !
>  Abe
> Aba
> !
> 
> sort << !
> Abe
> $Aba
> !
> 

Well, they do work. " Abe" *is* less than "Aba".  Blank is 040  and  A
is 0101.

In the second example the shell is reading the input and passing it to
sort.  $Aba  is interpreted as a shell variable, which probably had no
value.  Hence, the line is blank. (In fact, the C shell tosses it  out
immediately as undefined.  The Bournse shell doesn't care.)
-- 
Fred Avolio
301/731-4100 x4227
UUCP:  {seismo,decvax}!grendel!avolio
ARPA:  grendel!avolio at seismo.ARPA



More information about the Comp.unix.wizards mailing list