Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Source code for the programs in Effective Awk Programming

62 views
Skip to first unread message

Kenny McCormack

unread,
Jul 31, 2015, 9:22:46 PM7/31/15
to
Is there someplace online that I can get the source for the programs listed
in EAP?

Or do I have to try to OCR them?

--
Genesis 2:7 And the LORD God formed man of the dust of the ground, and
breathed into his nostrils the breath of life; and man became a living soul.

Janis Papanagnou

unread,
Aug 1, 2015, 2:25:01 AM8/1/15
to
On 01.08.2015 03:22, Kenny McCormack wrote:
> Is there someplace online that I can get the source for the programs listed
> in EAP?
>
> Or do I have to try to OCR them?

The book is available online[*], so I don't think you need OCR. Or is
there missing anything? (Have a look into chapters 10 and 11.)

Or, to extract all (pre-formatted code and data) at once instead of
copy/pasting them individually, extract it from the html source; e.g.

awk '/<pre/,/<\/pre/{print /<\/?pre/?"":$0}' gawk.html


Janis

[*] https://www.gnu.org/software/gawk/manual/gawk.html

Kenny McCormack

unread,
Aug 1, 2015, 10:50:37 AM8/1/15
to
In article <mphonr$tfp$1...@news.m-online.net>,
Thanks for the pointer. I think I'll be able to dig what I need out of
this.

Still, it would be nice if there was a simple source-code-only download
(Zipped, presumably) for the listings in the book. I think there is, I
just don't have any idea where it would be...


--
BigBusiness types (aka,
Republicans/Conservatives/Independents/Liberatarians/whatevers)
don't hate big government. They *love* big government as a means for
them to get rich, sucking off the public teat. What they don't like is
*democracy* - little people actually having the right to vote and stuff
like that.

Hermann Peifer

unread,
Aug 1, 2015, 11:44:57 AM8/1/15
to
On 2015-08-01 3:22, Kenny McCormack wrote:
> Is there someplace online that I can get the source for the programs listed
> in EAP?
>

You could have a look at:
http://git.savannah.gnu.org/cgit/gawk.git/tree/awklib/eg

Hermann

Kenny McCormack

unread,
Aug 2, 2015, 11:44:14 AM8/2/15
to
In article <mpipho$i85$1...@news.albasani.net>,
Yes, amazingly enough, that seems to be it.

Funny, because I assumed that that collection would be the samples from the
GAWK distribution, not the ones from the book, but, in fact, those two
things turn out to be one and the same.

So, the bottom line is that if you have the unpacked GAWK distribution on
your system (i.e., if you've ever built GAWK from source), then you already
have the programs from the book. Yey!

--
"If our country is going broke, let it be from
feeding the poor and caring for the elderly.
And not from pampering the rich and fighting
wars for them."

--Living Blue in a Red State--

Manuel Collado

unread,
Aug 3, 2015, 7:34:51 AM8/3/15
to
El 02/08/2015 a las 17:44, Kenny McCormack escribió:
> In article <mpipho$i85$1...@news.albasani.net>,
> Hermann Peifer <pei...@gmx.eu> wrote:
>> On 2015-08-01 3:22, Kenny McCormack wrote:
>>> Is there someplace online that I can get the source for the programs listed
>>> in EAP?
>>
>> You could have a look at:
>> http://git.savannah.gnu.org/cgit/gawk.git/tree/awklib/eg
>
> Yes, amazingly enough, that seems to be it.
>
> Funny, because I assumed that that collection would be the samples from the
> GAWK distribution, not the ones from the book, but, in fact, those two
> things turn out to be one and the same.
>
> So, the bottom line is that if you have the unpacked GAWK distribution on
> your system (i.e., if you've ever built GAWK from source), then you already
> have the programs from the book. Yey!
>

The fact is that the gawk build process automagically extracts the code
fragments from the gawk.texi file and creates de awklib/eg directory.

0 new messages