* [9fans] awk oddity?
@ 2000-07-11 13:23 Ed Brown
2000-07-13 12:48 ` Ed Brown
0 siblings, 1 reply; 2+ messages in thread
From: Ed Brown @ 2000-07-11 13:23 UTC (permalink / raw)
To: 9fans
The following commands:
awk '{print substr($0,1,8)}' bigfile >crud
and
awk '{print length($0,1,8)}' bigfile >crud
Seem to lock up awk on Plan9. If I launch either one there will be a
flurry of hard disk activity then nothing. A "ps" will reveal the
process is "ready", but the crud file stops growing at 8647 for the
first and 8192 for the second. Rebooting doesn't change these numbers.
More perplexing:
if I
tr 'A-Z' 'X' <bigfile >bigfile.noatoz
or
sed 100000q <bigfile >bigfile.100k
Then, use bigfile.noatoz or bigfile.100k the above awk scripts complete
successfully.
As a final check I tried the file on Linux. There were no problems.
My environment is single box Plan9 using kfs with 96MB of RAM.
bigfile is:
307312741 bytes.
731593 lines.
ascii text file with "\r\n" record separators
Does anybody have and idea what is going on here?
Thanks in advance
Ed Brown
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] awk oddity?
2000-07-11 13:23 [9fans] awk oddity? Ed Brown
@ 2000-07-13 12:48 ` Ed Brown
0 siblings, 0 replies; 2+ messages in thread
From: Ed Brown @ 2000-07-13 12:48 UTC (permalink / raw)
To: 9fans
>
> The following commands:
> awk '{print substr($0,1,8)}' bigfile >crud
> and
> awk '{print length($0,1,8)}' bigfile >crud
>
> Seem to lock up awk on Plan9. ...
<snip>
User error. bigfile was from another OS. I made an
assumption that it was *7-bit* ascii, and thus UTF.
A suggestion to other newbies like myself, run tcs on your "text"
files first.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-07-13 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-11 13:23 [9fans] awk oddity? Ed Brown
2000-07-13 12:48 ` Ed Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).