[comp.unix.questions] A question on awk and sort.

aj3u@ra.cs.Virginia.EDU (Asim Jalis) (05/29/90)

I need to use awk and sort on files with records that are longer than
the maximum length the two utilities allow.  I have looked at the man
pages and found nothing.  Is there a command line option through which
I could alter the maximum record lengths?

gwyn@smoke.BRL.MIL (Doug Gwyn) (05/29/90)

In article <1990May28.225953.222@murdoch.acc.Virginia.EDU> aj3u@ra.cs.Virginia.EDU (Asim Jalis) writes:
-I need to use awk and sort on files with records that are longer than
-the maximum length the two utilities allow.  I have looked at the man
-pages and found nothing.  Is there a command line option through which
-I could alter the maximum record lengths?

I can't help you with "awk", but as of SVR2 "sort" no longer has a record
length limit, so if you have access to that (perhaps as /usr/5bin/sort),
use it.

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (05/30/90)

In article <1990May28.225953.222@murdoch.acc.Virginia.EDU> aj3u@ra.cs.Virginia.EDU (Asim Jalis) writes:
: I need to use awk and sort on files with records that are longer than
: the maximum length the two utilities allow.  I have looked at the man
: pages and found nothing.  Is there a command line option through which
: I could alter the maximum record lengths?

You can alter the maximum record length by running the awk script through
the a2p translator and interpreting the result with perl, which has no
line length limitations.  Perl also has an internal sort operator, or you
can use the new SysV sort if available.

Larry Wall
lwall@jpl-devvax.jpl.nasa.gov

fischer@iesd.auc.dk (Lars P. Fischer) (06/01/90)

In article <1990May28.225953.222@murdoch.acc.Virginia.EDU> aj3u@ra.cs.Virginia.EDU (Asim Jalis) writes:
>I need to use awk and sort on files with records that are longer than
>the maximum length the two utilities allow.  

Get gawk, the GNU AWK. Available at a ftp site near you :-). No silly
restrictions. 

/Lars
--
Lars Fischer,  fischer@iesd.auc.dk   | NeXT: A disaster looking for a place
CS Dept., Univ. of Aalborg, DENMARK. | to happen  -- Bill Joy