🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #2419

Re: Shorter version of PostScript "Recycle" symbol

#2419
From: Glenn Reid
Date: Sun, 01 Jul 1990 17:55
42 lines
2102 bytes
In article <6785@umd5.umd.edu> zben@umd5.umd.edu (Ben Cranston) writes:
>               Anyway, I tried to put in the fix and the awk call started
> complaining about "arguments too long".
>
> The structure is some preliminary options stuff then the construct:
>
> awk 'BEGIN {
> <7 pages of a pretty complicated awk program>
> }' $*
>
> and the additions pushed the size of the program over 8192 characters and
> evidently Unix has that limit on the size of "program arguments".
>
> Given the choice of purging the comments, throwing away the indentation,
> or shortening the variable names, I decided:

This is of course getting off the beaten path of PostScript, but heck,
we all love to write shells scripts, too.  And there's always something
cosmic when a principle (like shortening names) applies in such different
circumstances.

Anyway, what I tend to do in this situation is to make a temporary file
with the awk script in it, so you don't care how long it is.  Something
along these lines:

    #!/bin/sh
    cat > /tmp/awk.$$ << 'END_OF_SCRIPT'
    BEGIN {
      <7 pages of a pretty complicated awk program>
    }
    END_OF_SCRIPT
    awk -f /tmp/awk.$$ $*

But this method has its complications, too, of course.  I just thought I'd
toss in my $.02....

Cheers,
 Glenn
-- 
% Glenn Reid				PostScript/NeXT consultant
% glenn@heaven.woodside.ca.us		One-day turnaround on many projects
% ..{adobe,next}!heaven!glenn		Unparalleled Quality
Technical Details
Message-ID: <193@heaven.woodside.ca.us>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!ukma!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!adobe!heaven!glenn
References: <6741@umd5.umd.edu> <185@heaven.woodside.ca.us> <6750@umd5.umd.edu> <186@heaven.woodside.ca.us> <6761@umd5.umd.edu> <188@heaven.woodside.ca.us> <6785@umd5.umd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!ukma!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!adobe!heaven!glenn
From: glenn@heaven.woodside.ca.us (Glenn Reid)
Newsgroups: comp.lang.postscript
Subject: Re: Shorter version of PostScript "Recycle" symbol
Message-ID: <193@heaven.woodside.ca.us>
Date: 1 Jul 90 17:55:56 GMT
References: <6741@umd5.umd.edu> <185@heaven.woodside.ca.us> <6750@umd5.umd.edu> <186@heaven.woodside.ca.us> <6761@umd5.umd.edu> <188@heaven.woodside.ca.us> <6785@umd5.umd.edu>
Reply-To: glenn@heaven.UUCP (Glenn Reid)
Organization: Skyline Press, Woodside CA
Lines: 42