Re: Geez - is Solaris /usr/bin/awk brain dead or what?

From: Aharon Robbins (arnold_at_skeeve.com)
Date: 09/12/04

  • Next message: rc: "Re: Limit on "fmt" buffer size? Loose much of long line."
    Date: 12 Sep 2004 09:57:24 +0200
    
    

    In article <8s25k05828m4gn42e52dfdop9ct0qigqte@4ax.com>,
    Brian Inglis <Brian.Inglis@SystematicSW.ab.ca> wrote:
    >What Solaris ships as /usr/bin/awk is probably the original Seventh
    >Edition version that nobody else has shipped or used for decades; but
    >gawk supports the original semantics with the --traditional option,
    >which you might want to test on your old script.

    No, gawk's --traditional option makes gawk support some of the stuff that
    the 1989 nawk did that wasn't documented, but it does NOT make gawk into a
    clone of the V7 awk. See the gawk doc for the details, I don't remember
    all of them off the top of my head.

    I suspect it's a Solaris man page bug, since the man page describes the
    newer versions which include ?:. The V7 awk did not.

    If the program uses ?:, Kenny, you have little choice except to use
    /bin/nawk or /usr/xpg4/bin/nawk. On the Solaris systems I've seen, they're
    different binaries. The latter, for example, should support CONVFMT.

    BTW, is it really all that hard to put

            #! /usr/xpg4/bin/awk -f

    at the top of the script?

    Arnold

    -- 
    Aharon (Arnold) Robbins --- Pioneer Consulting Ltd.	arnold AT skeeve DOT com
    P.O. Box 354		Home Phone: +972  8 979-0381	Fax: +1 206 350 8765
    Nof Ayalon		Cell Phone: +972 50  729-7545
    D.N. Shimshon 99785	ISRAEL
    

  • Next message: rc: "Re: Limit on "fmt" buffer size? Loose much of long line."

    Relevant Pages

    • Re: Automatisierte TextVerarbeitung
      ... AWK - oder bessergesagt "awk" kam mir doch gleich irgendwie bekannt vor ... Einige kann man auch als exe fuer Windows beziehen ... Ich habe soeben ein altes mawk herausgekramt und ein mini-awk script, ... Betreff: Re: where are the binaries for GAWK? ...
      (microsoft.public.de.german.windowsxp.sonstiges)
    • Re: Need help correcting this Bash function
      ... >> Why is it better to write a bash script than a script that runs ... machines that don't have bash or other more recent shells installed and, ... I do use gawk instead of old awk. ...
      (comp.unix.shell)
    • Re: Difference beetwen awk and gawk?
      ... I'm new to awk, I wrote a simple script using gawk, then change it to awk: ... 0602-533 Cannot find or open file afile.dat ...
      (comp.lang.awk)
    • how to list all defined variables
      ... Is there a way within awk (or within gawk) to list all the variable ... function or code block that can go in ENDof the script. ... TIA. ...
      (comp.lang.awk)
    • Re: Quoted fields containing field separator
      ... many responses and suggesting how you could fix that. ... Did you really try that "FPAT" thing in gawk? ... Or was the gawk script you ran the one at the end of your posting? ... Tawk does the job with FS and FPAT switches set, ...
      (comp.lang.awk)