Re: Alan Winston, when are you correcting your WASD book? - VMS

This is a discussion on Re: Alan Winston, when are you correcting your WASD book? - VMS ; From: Mark Daniel > Larry Kilgallen wrote: > > In article , sms@antinode.org (Steven M. Schweda) writes: > > > >>From: winston@SSRL.SLAC.STANFORD.EDU (Alan Winston - SSRL Central Computing) > >> > >>>>>$ unzip "-v" htrootxxx.zip > >>>>>$ unzip "-v" opensslwasdxxxx ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Alan Winston, when are you correcting your WASD book?

  1. Re: Alan Winston, when are you correcting your WASD book?

    From: Mark Daniel

    > Larry Kilgallen wrote:
    > > In article <07082521421814_2022C7FA@antinode.org>, sms@antinode.org (Steven M. Schweda) writes:
    > >
    > >>From: winston@SSRL.SLAC.STANFORD.EDU (Alan Winston - SSRL Central Computing)
    > >>
    > >>>>>$ unzip "-v" htrootxxx.zip
    > >>>>>$ unzip "-v" opensslwasdxxxx
    > >>>>>
    > >>>>>well, it should read
    > >>>>>
    > >>>>>$ unzip "-v" htrootxxx.zip
    > >>>>>$ set def [.ht_root]
    > >>>>>$ unzip "-v" [-]opensslwasdxxx
    > >>
    > >> My question would be, 'Why the quotation of "-v"?' I can see why
    > >>"-V" might need quotation, but not "-v".

    > >
    > > Absent quotation marks, DCL will upcase letters.

    >
    > The C-RTL complicates that by ensuring the command-line arguments passed
    > to main() have been lower-cased hence quoting preserves upper-case.


    In fact, newer C RTL versions can be made to do pretty much anything
    you want, as shown below.

    > > Thus -v or -V will be seen by the program as -V.
    > >
    > > I don't know what -v or -V means, and I try to avoid using programs
    > > that do not "speak" DCL, but that is how character processing works
    > > on a vanilla VMS account.


    The Info-ZIP programs offer optional CLI front-ends for the
    hyphen-challenged.

    > As the original context was a WASD related posting ...
    >
    > $ UNZIP -H
    >
    > describes it as
    >
    > -V retain VMS version numbers
    >
    > in contrast to
    >
    > -v list verbosely/show version info
    >
    > while
    >
    > $ ZIP -H
    >
    > describes it more accurately
    >
    > "-V" save VMS file attributes


    AIEEEE!!! "zip -h" describes Zip (more or less) accurately, while
    "unzip -h" describes UnZip (more or less) accurately. The "-V" options
    for the two programs do different things, which is the primary reason
    that the descriptions in the two help reports are different.

    > So the "-V" is specified by the WASD install instructions ensures the
    > original file attributes stored when ZIPed using "-V" are reflected in
    > the files created by the UNZIP. The quotes are required to preserve the
    > upper-case of the option.


    No, and no. The "-v" adds verbosity to UnZip, and never needs
    quotation. What upper-case option? "-V" would cause UnZip to restore
    VMS version numbers (if they were stored in the archive, typically as a
    result of using "zip -w") when it extracts files from the archive. When
    VMS file attributes are stored in an archive, typically as a result of
    using 'zip "-V"', _no_ special UnZip command-line options are needed to
    get the attributes restored when the files are extracted on a VMS
    system. That is, in general, all you need to do is:

    zip "-V" archive.zip file_spec
    unzip archive.zip ! No "-V'. No "-v".

    As for case, when in doubt, ask the program(s). On a VAX, or on a
    non-VAX system with SET PROCESS /PARSE_STYLE = TRADITIONAL:

    alp $ zip -v
    Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    [...]

    alp $ zip "-v"
    Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    [...]

    alp $ zip -V
    Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    [...]

    alp $ zip "-V"

    zip error: Invalid command arguments (cannot write zip file to terminal)

    Here, '-v', '"-v"', and '-V' are equivalent, while '"-V"' is different.

    On a (non-VAX) system with SET PROCESS /PARSE_STYLE = EXTENDED:

    alp $ zip -v
    Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    [...]

    alp $ zip "-v"
    Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    [...]

    alp $ zip -V

    zip error: Invalid command arguments (cannot write zip file to terminal)

    alp $ zip "-V"

    zip error: Invalid command arguments (cannot write zip file to terminal)

    Here, command-line case is preserved (as if by magic). (Or, as if by
    using DECC$ARGV_PARSE_STYLE.) With versions older than UnZip 5.52 and
    Zip 2.32, SET PROCESS /PARSE_STYLE may have no effect, but that doesn't
    change the (lack of) need to quote '-v'.

    Now, if you _want_ what 'unzip -v' does, it's ok with me, but it
    seems unlikely, and, in any case, you should never need to quote '-v'.
    If your reality differs from mine, feel free to demonstrate.

    ------------------------------------------------------------------------

    Steven M. Schweda sms@antinode-org
    382 South Warwick Street (+1) 651-699-9818
    Saint Paul MN 55105-2547

  2. Re: Alan Winston, when are you correcting your WASD book?

    Steven M. Schweda wrote:
    > From: Mark Daniel
    >
    >>Larry Kilgallen wrote:
    >>
    >>>In article <07082521421814_2022C7FA@antinode.org>, sms@antinode.org (Steven M. Schweda) writes:
    >>>
    >>>
    >>>>From: winston@SSRL.SLAC.STANFORD.EDU (Alan Winston - SSRL Central Computing)
    >>>>
    >>>>
    >>>>>>>$ unzip "-v" htrootxxx.zip
    >>>>>>>$ unzip "-v" opensslwasdxxxx
    >>>>>>>
    >>>>>>>well, it should read
    >>>>>>>
    >>>>>>>$ unzip "-v" htrootxxx.zip
    >>>>>>>$ set def [.ht_root]
    >>>>>>>$ unzip "-v" [-]opensslwasdxxx
    >>>>
    >>>> My question would be, 'Why the quotation of "-v"?' I can see why
    >>>>"-V" might need quotation, but not "-v".
    >>>
    >>>Absent quotation marks, DCL will upcase letters.

    >>
    >>The C-RTL complicates that by ensuring the command-line arguments passed
    >>to main() have been lower-cased hence quoting preserves upper-case.

    >
    >
    > In fact, newer C RTL versions can be made to do pretty much anything
    > you want, as shown below.
    >
    >
    >>>Thus -v or -V will be seen by the program as -V.
    >>>
    >>>I don't know what -v or -V means, and I try to avoid using programs
    >>>that do not "speak" DCL, but that is how character processing works
    >>>on a vanilla VMS account.

    >
    >
    > The Info-ZIP programs offer optional CLI front-ends for the
    > hyphen-challenged.
    >
    >
    >>As the original context was a WASD related posting ...
    >>
    >> $ UNZIP -H
    >>
    >>describes it as
    >>
    >> -V retain VMS version numbers
    >>
    >>in contrast to
    >>
    >> -v list verbosely/show version info
    >>
    >>while
    >>
    >> $ ZIP -H
    >>
    >>describes it more accurately
    >>
    >> "-V" save VMS file attributes

    >
    >
    > AIEEEE!!! "zip -h" describes Zip (more or less) accurately, while
    > "unzip -h" describes UnZip (more or less) accurately. The "-V" options
    > for the two programs do different things, which is the primary reason
    > that the descriptions in the two help reports are different.
    >
    >
    >>So the "-V" is specified by the WASD install instructions ensures the
    >>original file attributes stored when ZIPed using "-V" are reflected in
    >>the files created by the UNZIP. The quotes are required to preserve the
    >>upper-case of the option.

    >
    >
    > No, and no. The "-v" adds verbosity to UnZip, and never needs
    > quotation. What upper-case option? "-V" would cause UnZip to restore
    > VMS version numbers (if they were stored in the archive, typically as a
    > result of using "zip -w") when it extracts files from the archive. When
    > VMS file attributes are stored in an archive, typically as a result of
    > using 'zip "-V"', _no_ special UnZip command-line options are needed to
    > get the attributes restored when the files are extracted on a VMS
    > system. That is, in general, all you need to do is:
    >
    > zip "-V" archive.zip file_spec
    > unzip archive.zip ! No "-V'. No "-v".
    >
    > As for case, when in doubt, ask the program(s). On a VAX, or on a
    > non-VAX system with SET PROCESS /PARSE_STYLE = TRADITIONAL:
    >
    > alp $ zip -v
    > Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    > This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    > [...]
    >
    > alp $ zip "-v"
    > Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    > This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    > [...]
    >
    > alp $ zip -V
    > Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    > This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    > [...]
    >
    > alp $ zip "-V"
    >
    > zip error: Invalid command arguments (cannot write zip file to terminal)
    >
    > Here, '-v', '"-v"', and '-V' are equivalent, while '"-V"' is different.
    >
    > On a (non-VAX) system with SET PROCESS /PARSE_STYLE = EXTENDED:
    >
    > alp $ zip -v
    > Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    > This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    > [...]
    >
    > alp $ zip "-v"
    > Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
    > This is Zip 2.32 (June 19th 2006), by Info-ZIP.
    > [...]
    >
    > alp $ zip -V
    >
    > zip error: Invalid command arguments (cannot write zip file to terminal)
    >
    > alp $ zip "-V"
    >
    > zip error: Invalid command arguments (cannot write zip file to terminal)
    >
    > Here, command-line case is preserved (as if by magic). (Or, as if by
    > using DECC$ARGV_PARSE_STYLE.) With versions older than UnZip 5.52 and
    > Zip 2.32, SET PROCESS /PARSE_STYLE may have no effect, but that doesn't
    > change the (lack of) need to quote '-v'.
    >
    > Now, if you _want_ what 'unzip -v' does, it's ok with me, but it
    > seems unlikely, and, in any case, you should never need to quote '-v'.
    > If your reality differs from mine, feel free to demonstrate.


    Cheese. I don't think I'm built of stern-enough stuff to take even a
    small serve like this. I'm going to take my "-V" and go home.

    > ------------------------------------------------------------------------
    >
    > Steven M. Schweda sms@antinode-org
    > 382 South Warwick Street (+1) 651-699-9818
    > Saint Paul MN 55105-2547


    Seriously ... could this have been discovered without asking someone or
    examining the code-base? I can only assume this is not common knowlege
    because I'm sure someone would have pointed it out in over a decade of
    WASD distribution. Of course it's really so trivial that nobody might
    bother. But then the trivial is often grist to the c.o.v. mill :-)

    So, as I'm uninterested in versions and am interested in file
    attributes, I can take the "-V" out of the archive restore instructions
    and rely on using it at archive creation.

    Thanks.

    --
    Boris: Isn't all mankind ultimately executed for a crime it never
    committed? The difference is that all men go eventually, but I go six
    o'clock tomorrow morning. I was supposed to go at five o'clock, but I
    have a smart lawyer. Got leniency. [Woody Allen; Love and Death]

+ Reply to Thread