Re: gawk: invalid argument
From: Bill Marcum (bmarcum_at_iglou.com.urgent)
Date: 12/04/03
- Next message: greyfell_at_zerobyte.org: "Re: Calculate age of a file?"
- Previous message: Bill Marcum: "Re: gzip untar in specific directory /temporary"
- In reply to: Harry: "gawk: invalid argument"
- Next in thread: Harry: "Re: gawk: invalid argument"
- Reply: Harry: "Re: gawk: invalid argument"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 4 Dec 2003 17:01:47 -0500
On Thu, 04 Dec 2003 19:59:06 GMT, Harry
<harryooopotter@hotmail.co_> wrote:
>
> The script is more than 600 lines long.
>
> Apparently it is the length of the script causing gawk to bark
> "invalid argument." If I break the script into two (see below), it
> works fine.
>
> Here is how I break the script into two pieces.
> .... in the middle of the script ...
> -- at around line 350 .....
> printf "EA@_39 (Filler) \t\t= " substr($0,274,47) "\n"
> }
> END {}
> ' $infile
>
> $AWK ' { }
> /^#FA0/ { printf "\n>>>\n" $0 "<<<\n"
> printf "FA0_1 (Record ID) \t\t= " substr($0,1,3) "\n"
> printf "FA0_2 (Squence Number) \t\t= " substr($0,4,2) "\n"
> --
>
> This workaround parses the first half of the infile, generates output,
> and then continue to parse the next half. It's no good, as the output
> consists of results no longer having the same sequence of the input
> patterns (AA0, BA0, ... XA0, BA0,...., XA0, etc).
>
> Is is a bug in gawk? How can I resolve the "invalid argument" issue?
>
It might be a limitation of your shell. Put the script in a file and
execute it with gawk -f.
-- Thanks to Nigeria, any email with the word "urgent" in the subject or address will be deleted.
- Next message: greyfell_at_zerobyte.org: "Re: Calculate age of a file?"
- Previous message: Bill Marcum: "Re: gzip untar in specific directory /temporary"
- In reply to: Harry: "gawk: invalid argument"
- Next in thread: Harry: "Re: gawk: invalid argument"
- Reply: Harry: "Re: gawk: invalid argument"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|