Thread View: comp.unix.shell
3 messages
3 total messages
Started by Jim Wright
Sat, 06 Oct 1990 09:52
line length limit in awk
Author: Jim Wright
Date: Sat, 06 Oct 1990 09:52
Date: Sat, 06 Oct 1990 09:52
13 lines
856 bytes
856 bytes
Is the limitation of number of fields per record in (n)awk insurmountable? My data files consist of a julian date in "%13.5f " format followed by 100 data readings in " %8.2f" format, followed by a newline. Pretty tame stuff, but awk, nawk and vi all claim the lines are too long to deal with. Other tools have varying success. Am I screwed or is there and easy way to fix awk? (Without a source license.) -- Jim Wright jwright@cfht.hawaii.edu Canada-France-Hawaii Telescope Corp.
Re: line length limit in awk
Author: Jim Wright
Date: Sun, 07 Oct 1990 05:29
Date: Sun, 07 Oct 1990 05:29
18 lines
902 bytes
902 bytes
I write:
>Is the limitation of number of fields per record in (n)awk insurmountable?
And the results are in.
use gawk -- no mention if the limitation is still present, but you do
get source to fix it
use perl -- no such limitation
use a2p -- converts awk scripts to perl scripts
Choice three is for me. At least until I learn perl.
--
Jim Wright
jwright@cfht.hawaii.edu
Canada-France-Hawaii Telescope Corp.
Re: line length limit in awk
Author: Oscar Herrera
Date: Wed, 10 Oct 1990 14:33
Date: Wed, 10 Oct 1990 14:33
24 lines
1378 bytes
1378 bytes
|Is the limitation of number of fields per record in (n)awk insurmountable? |My data files consist of a julian date in "%13.5f " format followed |by 100 data readings in " %8.2f" format, followed by a newline. Pretty |tame stuff, but awk, nawk and vi all claim the lines are too long to |deal with. Other tools have varying success. Am I screwed or is |there and easy way to fix awk? (Without a source license.) I've run into similar problems in the past but have been able to 'work around' the limitations by combinations of the fold command and by redefining the record separator awk uses. Of course it is always easier if the data a files are preformatted by whatever process produces it with the post processing by awk in mind. Here is an example of a reformatted record. In the BEGIN part of your awk script you would redefine the record separator to # 1234567890123.12345 12345678.12 . . . 12345678.12 12345678.12 #
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads