AWK experts - how would I code around this in awk...
Dave Howorth
dhoworth at mrc-lmb.cam.ac.uk
Mon Feb 22 15:14:25 UTC 2010
Steve Flynn wrote:
> On Fri, Feb 19, 2010 at 2:35 PM, Karl Auer <kauer at biplane.com.au> wrote:
>> Cool! But:
Thanks.
> Indeed. A perl version of the bash script suggested by Alex.
>
>> - it reads the entire contents of stdin into memory
>
> This might be an issue. This AIX box does have 128 gig of RAM but
You need to qualify the type of memory. It reads stdin into *virtual*
memory. It's the amount of disk you have that limits the size, not the
amount of RAM. Just add swap space. You may prefer to use a 64 bit machine.
>> - there may be problems with arbitrarily large variables
Are you aware of any limits?
>> - a partial last record will not be terminated with a newline
I didn't see that in the req spec :-P You can complicate the program
with a print "\n" or somesuch if you must.
>> - it doesn't handle blank lines
>
> There may well be blank lines, especially where a data entry clerk has
> elected to space the text out with a couple of "enter enter enter"
> lines.
Karl's fix for that works local $/ = undef;
Cheers, Dave
PS I sent the prog for fun, don't take it too seriously.
More information about the ubuntu-users
mailing list