OpenVMS awk and gawk - VMS

This is a discussion on OpenVMS awk and gawk - VMS ; I've done due my diligence in Googling and searching the group archives. Nevertheless, I've not found an answer. I'm an old -- I mean really old -- VMS user. I'm working currently on OpenVMS V8.2. I took pity on the ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: OpenVMS awk and gawk

  1. OpenVMS awk and gawk

    I've done due my diligence in Googling and searching the group
    archives. Nevertheless, I've not found an answer. I'm an old -- I
    mean really old -- VMS user. I'm working currently on OpenVMS V8.2.
    I took pity on the younger fellows, and provided them with GNV. (I've
    always held the view that computers should be conformed to people,
    rather than vice versa.)

    So, here I am, diddling around with awk and gawk. To do so, I set up
    the symbols:

    $ awk == "$gnu:[bin]awk"
    $ gawk == "$gnu:[bin]gawk"

    It has all been interesting experimenting with basic awk on various
    command procedures and other text files -- later I'll try indexed
    files! Then I tried something like this:

    $ awk "/define/" sys$login:login.com

    To my surprise, awk (and gawk) can't find a file that is qualified.
    Indeed, anything other than a filename and extension doesn't work.
    Here's the error I get:

    /$1$DGA928/GNV/GNV/bin/AWK: cmd. line:2: fatal: cannot open file `sys
    $login:login.com' for reading (i/o error)

    My attempts using various quoting or even unix-like file
    specifications, have failed to yield anything but variations of the
    above error. This is particularly unsatisfying, although I suppose I
    could create a DCL wrapper around these tools. :-(

    However, if there is one thing I've learned by watching this forum,
    its that there are a bunch of you folks out there who've been on VMS
    at least as long as I have, yet lacking whatever mental deficiencies
    that are precluding my solving problems like the one above.

    Might someone have mercy on an old man, and give a hint?

  2. Re: OpenVMS awk and gawk

    In article
    <822838a9-40c9-4bf0-9d89-178ee0de012a@q39g2000hsf.googlegroups.com>,
    Doc wrote:

    > So, here I am, diddling around with awk and gawk. To do so, I set up
    > the symbols:
    >
    > $ awk == "$gnu:[bin]awk"
    > $ gawk == "$gnu:[bin]gawk"
    >
    > It has all been interesting experimenting with basic awk on various
    > command procedures and other text files -- later I'll try indexed
    > files! Then I tried something like this:
    >
    > $ awk "/define/" sys$login:login.com
    >
    > To my surprise, awk (and gawk) can't find a file that is qualified.
    > Indeed, anything other than a filename and extension doesn't work.
    > Here's the error I get:
    >
    > /$1$DGA928/GNV/GNV/bin/AWK: cmd. line:2: fatal: cannot open file `sys
    > $login:login.com' for reading (i/o error)
    >
    > My attempts using various quoting or even unix-like file
    > specifications, have failed to yield anything but variations of the
    > above error. This is particularly unsatisfying, although I suppose I
    > could create a DCL wrapper around these tools. :-(


    This works for me, i.e., Unix syntax and quoting:

    $ awk "/define/" "/sys$login/login.com"

    That was from DCL. In bash you need to escape the dollar sign so it
    doesn't interpret '$login' as a variable:

    $ awk "/define/" /sys\$login/login.com

    --
    Posted via a free Usenet account from http://www.teranews.com


  3. Re: OpenVMS awk and gawk

    On Jan 11, 8:26 am, "Craig A. Berry"
    wrote:

    > This works for me, i.e., Unix syntax and quoting:
    >
    > $ awk "/define/" "/sys$login/login.com"
    >
    > That was from DCL. In bash you need to escape the dollar sign so it
    > doesn't interpret '$login' as a variable:
    >
    > $ awk "/define/" /sys\$login/login.com


    Thank you, Craig... it works perfectly!

    When I grow up, I'm gonna be just like you! :-)

  4. Re: OpenVMS awk and gawk

    On Jan 11, 8:55*am, Doc wrote:
    > I've done due my diligence in Googling and searching the group
    > archives. *Nevertheless, I've not found an answer. *I'm an old -- I
    > mean really old -- VMS user. *I'm working currently on OpenVMS V8.2.
    > I took pity on the younger fellows, and provided them with GNV. *(I've
    > always held the view that computers should be conformed to people,
    > rather than vice versa.)
    >
    > So, here I am, diddling around with awk and gawk. *To do so, I set up
    > the symbols:
    >
    > $ awk == "$gnu:[bin]awk"
    > $ gawk == "$gnu:[bin]gawk"
    >
    > It has all been interesting experimenting with basic awk on various
    > command procedures and other text files -- later I'll try indexed
    > files! *Then I tried something like this:
    >
    > $ awk "/define/" sys$login:login.com
    >
    > To my surprise, awk (and gawk) can't find a file that is qualified.
    > Indeed, anything other than a filename and extension doesn't work.
    > Here's the error I get:
    >
    > /$1$DGA928/GNV/GNV/bin/AWK: cmd. line:2: fatal: cannot open file `sys
    > $login:login.com' for reading (i/o error)
    >
    > My attempts using various quoting or even unix-like file
    > specifications, have failed to yield anything but variations of the
    > above error. *This is particularly unsatisfying, although I suppose I
    > could create a DCL wrapper around these tools. :-(
    >
    > However, if there is one thing I've learned by watching this forum,
    > its that there are a bunch of you folks out there who've been on VMS
    > at least as long as I have, yet lacking whatever mental deficiencies
    > that are precluding my solving problems like the one above.
    >
    > Might someone have mercy on an old man, and give a hint?


    and awk and gawk make more sense than using vms
    commands?

    it might be a better idea to let them use dcl so they can
    learn how to use commands that make sense ...

    either unix is more convuluted than I thought or we both
    are getting really old ...

  5. Re: OpenVMS awk and gawk

    > and awk and gawk make more sense than using vms
    > commands?


    No, not at all! What makes sense is for a person to be able to use
    vi, eve, lse, etc. on any platform on which they are required to
    work. (In 35 years I've seen little change in the assumption that
    programming people is preferable to programming computers.)

    They are learning DCL. I'm learning the unix tools. The latter is
    primarily a psychological ploy intended to augment the former -- but
    if something practical comes of it, we're that far ahead of the game.

    > either unix is more convuluted than I thought or we both
    > are getting really old ...


    IMHO, the convolution reflects our failure to teach the last couple of
    generations that there is more to design and programming than
    "Cool!" (I was going to say "Neato!")

    The "getting really old" is a default setting for which I have yet to
    find a really "cool" hack. :-)

    Thank you, everyone, for the help!

+ Reply to Thread