• Unix and DCL shells

    From Simon Clubley@21:1/5 to Scott Dorsey on Mon Jan 8 14:21:18 2024
    On 2024-01-07, Scott Dorsey <kludge@panix.com> wrote:
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    The whole command-line concept on VMS is fundamentally flawed. Notice that >>on *nix, the command line is not a single string, it is an array of >>strings. This makes it easy to pass special characters that might mean >>something to the shell, simply by bypassing the shell.

    Having made the Unix-to-VMS transition in the late eighties, the two things
    I really liked about DCL were the handling of wildcards and the ability to use [....] for recursive file paths. I would love to have those two things in bash.


    Things I would like to see from bash in DCL:

    Filename globbing.

    Tab completion of files/directories with list of matches at each stage.

    Ability to edit lines longer than the terminal width.

    Easy incremental recall of commands (Ctrl-R in bash).

    Synchronised permanent storage of command history across sessions. Supports using multiple sessions at the same time and only writes the changes from
    that session to the history file.

    Things I would like to see in bash on Linux:

    Ctrl-T

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Mon Jan 8 09:38:15 2024
    On 1/8/2024 9:21 AM, Simon Clubley wrote:
    On 2024-01-07, Scott Dorsey <kludge@panix.com> wrote:
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    The whole command-line concept on VMS is fundamentally flawed. Notice that >>> on *nix, the command line is not a single string, it is an array of
    strings. This makes it easy to pass special characters that might mean
    something to the shell, simply by bypassing the shell.

    Having made the Unix-to-VMS transition in the late eighties, the two things >> I really liked about DCL were the handling of wildcards and the ability to >> use [....] for recursive file paths. I would love to have those two things >> in bash.

    Things I would like to see from bash in DCL:

    Filename globbing.

    Backwards compatibility will show its ugly head again.

    $ define dcl$enable_globbing true

    to enable?

    foobar *.xyz *.abc

    Foreign command expand to:

    foobar 1.xyz 2.xyz 3.abc 4.abc ! 4 arguments

    CLD expand to:

    foobar 1.xyz,2.xyz 3.abc,4.abc ! 2 arguments

    Or?

    Tab completion of files/directories with list of matches at each stage.

    Would be very nice indeed and should not break anything.

    Ability to edit lines longer than the terminal width.

    Ditto.

    Even though I believe we usually get a long story about how DCL
    and the terminal driver interacts.

    Easy incremental recall of commands (Ctrl-R in bash).

    Synchronised permanent storage of command history across sessions. Supports using multiple sessions at the same time and only writes the changes from that session to the history file.

    I usually just write a COM file if I want to preserve my commands.

    But other may like the history you propose.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Froble@21:1/5 to Simon Clubley on Mon Jan 8 10:35:07 2024
    On 1/8/2024 9:21 AM, Simon Clubley wrote:
    On 2024-01-07, Scott Dorsey <kludge@panix.com> wrote:
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    The whole command-line concept on VMS is fundamentally flawed. Notice that >>> on *nix, the command line is not a single string, it is an array of
    strings. This makes it easy to pass special characters that might mean
    something to the shell, simply by bypassing the shell.

    Having made the Unix-to-VMS transition in the late eighties, the two things >> I really liked about DCL were the handling of wildcards and the ability to >> use [....] for recursive file paths. I would love to have those two things >> in bash.


    Things I would like to see from bash in DCL:

    Filename globbing.

    Don't have a clue what globbing is. Probably don't want to know anyway.

    Tab completion of files/directories with list of matches at each stage.

    You're discussing something that might be useful on a personal workstation. Not
    something very useful on a server type of system.

    Ability to edit lines longer than the terminal width.

    That is a valid bitch. The explanation has been that getting into the terminal driver is similar to a maze of twisty little passages.

    Easy incremental recall of commands (Ctrl-R in bash).

    Not sure what you want Simon? Doesn't RECALL do it? Does for me.

    Synchronised permanent storage of command history across sessions. Supports using multiple sessions at the same time and only writes the changes from that session to the history file.

    Ah, see above about personal workstation ...

    Things I would like to see in bash on Linux:

    Ctrl-T

    Not a problem, don't use Linux, use VMS ...


    --
    David Froble Tel: 724-529-0450
    Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
    DFE Ultralights, Inc.
    170 Grimplin Road
    Vanderbilt, PA 15486

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Froble@21:1/5 to Simon Clubley on Mon Jan 8 10:37:36 2024
    On 1/8/2024 9:21 AM, Simon Clubley wrote:
    On 2024-01-07, Scott Dorsey <kludge@panix.com> wrote:
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    The whole command-line concept on VMS is fundamentally flawed. Notice that >>> on *nix, the command line is not a single string, it is an array of
    strings. This makes it easy to pass special characters that might mean
    something to the shell, simply by bypassing the shell.

    Having made the Unix-to-VMS transition in the late eighties, the two things >> I really liked about DCL were the handling of wildcards and the ability to >> use [....] for recursive file paths. I would love to have those two things >> in bash.


    Things I would like to see from bash in DCL:

    Ya know Simon, JF once asked for password completion. Not all desires are reasonable.

    :-)


    --
    David Froble Tel: 724-529-0450
    Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
    DFE Ultralights, Inc.
    170 Grimplin Road
    Vanderbilt, PA 15486

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Dave Froble on Mon Jan 8 10:51:32 2024
    On 1/8/2024 10:35 AM, Dave Froble wrote:
    On 1/8/2024 9:21 AM, Simon Clubley wrote:
    Things I would like to see from bash in DCL:

    Filename globbing.

    Don't have a clue what globbing is.  Probably don't want to know anyway.

    Wildcard expansion in the shell not the program.

    If you have a VMS Basic program that you run with:

    $ mcr []df *.bas

    then your Basic program sees one argument with *.bas and can lookup
    the matching files with LIB$FIND_FILE or whatever.

    If Simons idea get implemented and enabled then your Basic program
    would see N arguments with DF.BAS, X.BAS, Y.BAS etc. - DCL would expand
    the wildcards instead of leaving it to the program.

    It is a *nix thing.

    Tab completion of files/directories with list of matches at each stage.

    You're discussing something that might be useful on a personal
    workstation.  Not something very useful on a server type of system.

    I think system managers of servers could benefit as well.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Townley@21:1/5 to All on Mon Jan 8 16:06:13 2024
    On 08/01/2024 15:51, Arne Vajhøj wrote:
    On 1/8/2024 10:35 AM, Dave Froble wrote:
    On 1/8/2024 9:21 AM, Simon Clubley wrote:
    Things I would like to see from bash in DCL:

    Filename globbing.

    Don't have a clue what globbing is.  Probably don't want to know anyway.

    Wildcard expansion in the shell not the program.

    If you have a VMS Basic program that you run with:

    $ mcr []df *.bas

    then your Basic program sees one argument with *.bas and can lookup
    the matching files with LIB$FIND_FILE or whatever.

    If Simons idea get implemented and enabled then your Basic program
    would see N arguments with DF.BAS, X.BAS, Y.BAS etc. - DCL would expand
    the wildcards instead of leaving it to the program.

    It is a *nix thing.

    Tab completion of files/directories with list of matches at each stage.

    You're discussing something that might be useful on a personal
    workstation.  Not something very useful on a server type of system.

    I think system managers of servers could benefit as well.

    Arne


    Problem there is line length limits. I have frequently had that problem
    on *nix

    --
    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to arne@vajhoej.dk on Mon Jan 8 18:25:07 2024
    On 2024-01-08, Arne Vajhj <arne@vajhoej.dk> wrote:
    On 1/8/2024 10:35 AM, Dave Froble wrote:
    On 1/8/2024 9:21 AM, Simon Clubley wrote:
    Things I would like to see from bash in DCL:

    Filename globbing.

    Don't have a clue what globbing is. Probably don't want to know anyway.

    Wildcard expansion in the shell not the program.

    If you have a VMS Basic program that you run with:

    $ mcr []df *.bas

    then your Basic program sees one argument with *.bas and can lookup
    the matching files with LIB$FIND_FILE or whatever.

    If Simons idea get implemented and enabled then your Basic program
    would see N arguments with DF.BAS, X.BAS, Y.BAS etc. - DCL would expand
    the wildcards instead of leaving it to the program.

    It is a *nix thing.


    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    For David's benefit:

    https://tldp.org/LDP/abs/html/globbingref.html

    DCL doesn't have anything that even begins to compare with that.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Mon Jan 8 13:33:11 2024
    On 1/8/2024 1:25 PM, Simon Clubley wrote:
    On 2024-01-08, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 1/8/2024 10:35 AM, Dave Froble wrote:
    On 1/8/2024 9:21 AM, Simon Clubley wrote:
    Things I would like to see from bash in DCL:

    Filename globbing.

    Don't have a clue what globbing is.  Probably don't want to know anyway. >>
    Wildcard expansion in the shell not the program.

    If you have a VMS Basic program that you run with:

    $ mcr []df *.bas

    then your Basic program sees one argument with *.bas and can lookup
    the matching files with LIB$FIND_FILE or whatever.

    If Simons idea get implemented and enabled then your Basic program
    would see N arguments with DF.BAS, X.BAS, Y.BAS etc. - DCL would expand
    the wildcards instead of leaving it to the program.

    It is a *nix thing.


    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    For David's benefit:

    https://tldp.org/LDP/abs/html/globbingref.html

    DCL doesn't have anything that even begins to compare with that.

    But there are two aspects:
    1) VMS *% vs the let us call it "regex like"
    2) whether it happens in DCL or inside .EXE/.COM file

    The first one is not so hard. There will be some decisions to make
    regarding syntax as [] may not be a good choice on VMS. But when
    syntax is agreed then I assume that a change to SYS$SEARCH
    will make LIB$FIND_FILE and F$SEARCH work.

    The second could be a little tricky to implement without
    breaking too much.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to All on Mon Jan 8 14:18:47 2024
    On 1/8/2024 2:14 PM, mjos_examine wrote:
    [globbing]
    On 2024-01-08 1:33 p.m., Arne Vajhøj wrote:
    But there are two aspects:
    [...]
    2) whether it happens in DCL or inside .EXE/.COM file

    [...]

    The second could be a little tricky to implement without
    breaking too much.

    Does the pipe command glob before passing the command line arguments on?

    No. But obviously /GLOB could be added to PIPE.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From chrisq@21:1/5 to All on Mon Jan 8 20:10:09 2024
    On 1/8/24 19:02, mjos_examine wrote:
    On 2024-01-08 9:38 a.m., Arne Vajhøj wrote:
    On 2024-01-08 9:21 a.m., Simon Clubley wrote:
    Synchronised permanent storage of command history across sessions.
    Supports
    using multiple sessions at the same time and only writes the changes
    from
    that session to the history file.

    I usually just write a COM file if I want to preserve my commands.

    But other may like the history you propose.

    I have to agree that being able to up-arrow through commands done during
    my last session, whether 5 minutes, or 5 days, or 5 months later, can be
    very useful and convenient.

    Couple that with the sister-feature of being able to back-scroll through
    all the terminal output from the last session, and now you are really
    talking useful and convenient.





    One of the most irritating things about working on terminal
    based systems was the lack of command line recall. To be fair
    though, early unix systems with csh or sh lacked that as well.
    Solution here was to select tcsh, which did have command line recall capability, even back in the early 1990's

    Not a problem now, bash, csh and perhaps others. all support command
    line recall, with cmdline buffer length a terminal setup parameter.
    history (aliased h), shows the whole list, with !<line number>,
    selecting and running any item.

    Can be a steep learning curve, and easily forgotten without use,
    but so much workflow power in the unix shell...

    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Dorsey@21:1/5 to clubley@remove_me.eisner.decus.org- on Mon Jan 8 20:13:05 2024
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

    Things I would like to see in bash on Linux:

    Ctrl-T

    That IS a cool thing, I agree. I remember running BRL Unix on an 11/730,
    which I think was 4.1BSD with a lot of additional stuff from the Army Ballistics Research Lab, and one of the features was a ctrl-T to show
    process status. I have no idea how it was implemented and what signal
    ugliness was involved, though.
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Scott Dorsey on Mon Jan 8 15:35:01 2024
    On 1/8/2024 3:19 PM, Scott Dorsey wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    regexps are built into a lot of Unix utilities at fairly low levels and
    this is incredibly powerful.

    But I cannot say "mv *.txt *.dat" in order to change every file extension
    in the current working directory. This is the downside.

    But DCL is not bash.

    I actually think it could work in DCL.

    $ SET PROC/GLOB=ON
    $ REN *.TXT "*.DAT"

    could be interpreted as:

    $ REN 1.TXT,2.TXT,3.TXT *.DAT

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to devzero@nospam.com on Mon Jan 8 21:14:42 2024
    In article <unhkr1$1lj0v$1@dont-email.me>, chrisq <devzero@nospam.com> wrote: >On 1/8/24 19:02, mjos_examine wrote:
    On 2024-01-08 9:38 a.m., Arne Vajhøj wrote:
    On 2024-01-08 9:21 a.m., Simon Clubley wrote:
    Synchronised permanent storage of command history across sessions.
    Supports
    using multiple sessions at the same time and only writes the changes
    from
    that session to the history file.

    I usually just write a COM file if I want to preserve my commands.

    But other may like the history you propose.

    I have to agree that being able to up-arrow through commands done during
    my last session, whether 5 minutes, or 5 days, or 5 months later, can be
    very useful and convenient.

    Couple that with the sister-feature of being able to back-scroll through
    all the terminal output from the last session, and now you are really
    talking useful and convenient.





    One of the most irritating things about working on terminal
    based systems was the lack of command line recall. To be fair
    though, early unix systems with csh or sh lacked that as well.
    Solution here was to select tcsh, which did have command line recall >capability, even back in the early 1990's

    `csh` certainly had command history, though not "recall" in the
    sense of using an arror key or ^P or something to bring a
    previously executed back back to the prompt for editing. Korn's
    shell had similar functionality, and various people hacked it
    into `sh` at different times.

    tcsh, bash, zsh all had such functionality in the early 1990s,
    of course, using both the csh syntax as well as the ability;
    tcsh starting in the 80s. ksh (at least 93) might be
    configurable to do something similar, but I can't recall now.

    Not a problem now, bash, csh and perhaps others. all support command
    line recall, with cmdline buffer length a terminal setup parameter.
    history (aliased h), shows the whole list, with !<line number>,
    selecting and running any item.

    Can be a steep learning curve, and easily forgotten without use,
    but so much workflow power in the unix shell...

    Yup.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Dorsey@21:1/5 to clubley@remove_me.eisner.decus.org- on Mon Jan 8 20:19:22 2024
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    regexps are built into a lot of Unix utilities at fairly low levels and
    this is incredibly powerful.

    But I cannot say "mv *.txt *.dat" in order to change every file extension
    in the current working directory. This is the downside.
    --scott

    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Scott Dorsey on Mon Jan 8 21:22:36 2024
    In article <unhl0h$3ca$1@panix2.panix.com>,
    Scott Dorsey <kludge@panix.com> wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

    Things I would like to see in bash on Linux:

    Ctrl-T

    That IS a cool thing, I agree. I remember running BRL Unix on an 11/730, >which I think was 4.1BSD with a lot of additional stuff from the Army >Ballistics Research Lab, and one of the features was a ctrl-T to show
    process status. I have no idea how it was implemented and what signal >ugliness was involved, though.

    BSD still supports this; SIGINFO is the signal. Of course, it
    has to be caught by the program and the program has to elect to
    do something intelligent with it, and many do not.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Scott Dorsey on Mon Jan 8 21:20:28 2024
    In article <unhlca$qpj$1@panix2.panix.com>,
    Scott Dorsey <kludge@panix.com> wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    regexps are built into a lot of Unix utilities at fairly low levels and
    this is incredibly powerful.

    But I cannot say "mv *.txt *.dat" in order to change every file extension
    in the current working directory. This is the downside.

    True, but there are things like http://mcvoy.com/lm/move.shar
    that give you such functionality.

    People often forget that the globbing functionality in Unix is
    entirely internal to the shell (though, in fairness, there are a
    couple of userspace libraries that provide essentially the same
    thing), and the shell is just another userspace program, so if
    one really wanted, one could always replace the shell with
    something that did wildcard expansion differently. Of course,
    how that would _expand_ in e.g. the `mv` case is another
    matter.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to bill.gunshannon@gmail.com on Mon Jan 8 22:09:14 2024
    In article <l037lbF2supU10@mid.individual.net>,
    bill <bill.gunshannon@gmail.com> wrote:
    On 1/8/2024 4:14 PM, Dan Cross wrote:
    In article <unhkr1$1lj0v$1@dont-email.me>, chrisq <devzero@nospam.com> wrote:
    On 1/8/24 19:02, mjos_examine wrote:
    On 2024-01-08 9:38 a.m., Arne Vajhøj wrote:
    On 2024-01-08 9:21 a.m., Simon Clubley wrote:
    Synchronised permanent storage of command history across sessions. >>>>>> Supports
    using multiple sessions at the same time and only writes the changes >>>>>> from
    that session to the history file.

    I usually just write a COM file if I want to preserve my commands.

    But other may like the history you propose.

    I have to agree that being able to up-arrow through commands done during >>>> my last session, whether 5 minutes, or 5 days, or 5 months later, can be >>>> very useful and convenient.

    Couple that with the sister-feature of being able to back-scroll through >>>> all the terminal output from the last session, and now you are really
    talking useful and convenient.





    One of the most irritating things about working on terminal
    based systems was the lack of command line recall. To be fair
    though, early unix systems with csh or sh lacked that as well.
    Solution here was to select tcsh, which did have command line recall
    capability, even back in the early 1990's

    `csh` certainly had command history, though not "recall" in the
    sense of using an arror key or ^P or something to bring a
    previously executed back back to the prompt for editing. Korn's
    shell had similar functionality, and various people hacked it
    into `sh` at different times.

    I use the arrow keys all the time in csh. Been doing that
    since at least the SunOS days. Don't remember if Ultrix
    even had csh. Guess I should check.

    Unlikely. Tcsh, sure, but not /bin/csh.

    Ultrix had csh.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Dorsey@21:1/5 to Dan Cross on Mon Jan 8 22:59:19 2024
    In article <unhrqa$6f4$1@reader1.panix.com>,
    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <l037lbF2supU10@mid.individual.net>,
    bill <bill.gunshannon@gmail.com> wrote:
    On 1/8/2024 4:14 PM, Dan Cross wrote:
    In article <unhkr1$1lj0v$1@dont-email.me>, chrisq <devzero@nospam.com> wrote:
    On 1/8/24 19:02, mjos_examine wrote:
    On 2024-01-08 9:38 a.m., Arne Vajhøj wrote:
    On 2024-01-08 9:21 a.m., Simon Clubley wrote:
    Synchronised permanent storage of command history across sessions. >>>>>>> Supports
    using multiple sessions at the same time and only writes the changes >>>>>>> from
    that session to the history file.

    I usually just write a COM file if I want to preserve my commands. >>>>>>
    But other may like the history you propose.

    I have to agree that being able to up-arrow through commands done during >>>>> my last session, whether 5 minutes, or 5 days, or 5 months later, can be >>>>> very useful and convenient.

    Couple that with the sister-feature of being able to back-scroll through >>>>> all the terminal output from the last session, and now you are really >>>>> talking useful and convenient.





    One of the most irritating things about working on terminal
    based systems was the lack of command line recall. To be fair
    though, early unix systems with csh or sh lacked that as well.
    Solution here was to select tcsh, which did have command line recall
    capability, even back in the early 1990's

    `csh` certainly had command history, though not "recall" in the
    sense of using an arror key or ^P or something to bring a
    previously executed back back to the prompt for editing. Korn's
    shell had similar functionality, and various people hacked it
    into `sh` at different times.

    I use the arrow keys all the time in csh. Been doing that
    since at least the SunOS days. Don't remember if Ultrix
    even had csh. Guess I should check.

    Unlikely. Tcsh, sure, but not /bin/csh.

    Ultrix had csh.

    It did, but I installed tcsh off some net repository because it was so
    much better.
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Scott Dorsey on Mon Jan 8 23:59:00 2024
    In article <unhuo7$2dg$1@panix2.panix.com>,
    Scott Dorsey <kludge@panix.com> wrote:
    In article <unhrqa$6f4$1@reader1.panix.com>,
    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <l037lbF2supU10@mid.individual.net>,
    bill <bill.gunshannon@gmail.com> wrote:
    [snip]
    I use the arrow keys all the time in csh. Been doing that
    since at least the SunOS days. Don't remember if Ultrix
    even had csh. Guess I should check.

    Unlikely. Tcsh, sure, but not /bin/csh.

    Ultrix had csh.

    It did, but I installed tcsh off some net repository because it was so
    much better.

    Yeah. Tcsh was more or less requisite on a BSD-ish system for a
    long while. At least for interactive use; "program with Bourne,
    type with Joy" was a motto back in those days.

    I stuck with tcsh for a long while until I started working at
    Google. Then, network effects made me switch to Bash. These
    days, it's mostly zsh everywhere.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Eager@21:1/5 to Scott Dorsey on Mon Jan 8 23:46:19 2024
    On Mon, 08 Jan 2024 20:19:22 +0000, Scott Dorsey wrote:

    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    regexps are built into a lot of Unix utilities at fairly low levels and
    this is incredibly powerful.

    But I cannot say "mv *.txt *.dat" in order to change every file
    extension in the current working directory. This is the downside.
    --scott

    Agreed. But there is a commonly available utility for that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Eager@21:1/5 to Dan Cross on Tue Jan 9 00:59:38 2024
    On Mon, 08 Jan 2024 23:59:00 +0000, Dan Cross wrote:

    Yeah. Tcsh was more or less requisite on a BSD-ish system for a long
    while. At least for interactive use; "program with Bourne,
    type with Joy" was a motto back in those days.

    I stuck with tcsh for a long while until I started working at Google.
    Then, network effects made me switch to Bash. These days, it's mostly
    zsh everywhere.

    We never had a PDP-11 with separate I and D space, so we never really had
    room for BSD on the 11. Once we got the VAX machines, we ran it. I've been using it ever since (now on FreeBSD).

    I moved to csh when it first came out and have never changed. At some
    point csh was linked to tcsh, and I do use the extra facilities.

    For scripting, I use sh (not bash). Or I use REXX.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to All on Mon Jan 8 20:18:54 2024
    On 1/8/2024 4:41 PM, mjos_examine wrote:
    there could be a VMSBASH foreign command, where you could utilize the
    DECK command, like so:
        $ VMSBASH
        $ DECK
        if ! test -f /path/to/file; then
        echo "File does not exist."
        fi
        $ EOD

    You could (in theory) place any arbitrary bash script, for
    interpretation and execution by a VMSBASH foreign command that expects
    to operate in that way, between $DECK and $EOD.

    The command preceding the DECK command could function somewhat like the
    niche of #!/bin/bash on UNIX for specifying the desired interpreter for
    the arbitrary syntax that is between $DECK and $EOD.

    bash is part of the GNV kit. And it works fine with deck & eod, but
    if no bash commands start with $ then deck + eod should not be needed.

    This works fine:

    $ bash
    for i in {1..3}
    do
    echo $i
    done
    $
    $ bash
    $ deck
    for i in {1..3}
    do
    echo $i
    done
    $ eod
    $ exit

    Output:

    1
    2
    3
    1
    2
    3

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Simon Clubley on Tue Jan 9 01:35:25 2024
    On Mon, 8 Jan 2024 14:21:18 -0000 (UTC), Simon Clubley wrote:

    Things I would like to see in bash on Linux:

    Ctrl-T

    The terminal driver is one part of VMS that I remember fondly. But in *nix systems, terminal drivers are “character devices”, and there is no concept of I/O request packets--unless you do all your driver calls via ioctl, I
    guess.

    I don’t feel the need for CTRL/T simply because I have something like a
    dozen or two dozen terminal sessions open at any one time, and it is easy enough to check up on a hung-looking process from another session. I can
    even rummage around in procfs to check the status of open files and memory usage in the problem process, which is way more than you can do with CTRL/
    T anyway.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Bob Eager on Tue Jan 9 02:36:33 2024
    On 9 Jan 2024 00:59:38 GMT, Bob Eager wrote:

    For scripting, I use sh (not bash).

    bash really offers a lot more useful stuff than a vanilla POSIX shell.
    Like coproc.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Simon Clubley on Tue Jan 9 02:27:24 2024
    On Mon, 8 Jan 2024 18:25:07 -0000 (UTC), Simon Clubley wrote:

    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    But not as powerful as the “find” command. I find if I need to do more complex types of file-filtering, I don’t bother with globbing, I go
    straight to find.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Eager@21:1/5 to Lawrence D'Oliveiro on Tue Jan 9 08:49:07 2024
    On Tue, 09 Jan 2024 02:36:33 +0000, Lawrence D'Oliveiro wrote:

    On 9 Jan 2024 00:59:38 GMT, Bob Eager wrote:

    For scripting, I use sh (not bash).

    bash really offers a lot more useful stuff than a vanilla POSIX shell.
    Like coproc.

    I'm sure it does. But at that point I use other labguages.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Single Stage to Orbit@21:1/5 to Dave Froble on Tue Jan 9 10:49:53 2024
    On Mon, 2024-01-08 at 10:37 -0500, Dave Froble wrote:
    Things I would like to see from bash in DCL:

    Ya know Simon, JF once asked for password completion.  Not all
    desires are reasonable.

    The mind boggles.
    --
    Tactical Nuclear Kittens

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to bill.gunshannon@gmail.com on Tue Jan 9 13:39:57 2024
    In article <l03lb8Fbk87U8@mid.individual.net>,
    bill <bill.gunshannon@gmail.com> wrote:
    On 1/8/2024 5:09 PM, Dan Cross wrote:
    In article <l037lbF2supU10@mid.individual.net>,
    bill <bill.gunshannon@gmail.com> wrote:
    [snip]
    I use the arrow keys all the time in csh. Been doing that
    since at least the SunOS days. Don't remember if Ultrix
    even had csh. Guess I should check.

    Unlikely. Tcsh, sure, but not /bin/csh.

    Ultrix had csh.

    I just checked. No arrow keys in Ultrix-11. I wonder if
    BSD2.11 had it? But most likely FreeBSD which I have used since it's >inception.

    Nope, not there either.

    FreeBSD ditched the traditional Berkeley csh a while back and
    replaced it with tcsh, with a link to /bin/csh, so that when you
    run `csh` on FreeBSD you're really running `tcsh`. Tcsh
    supports arrow key navigation for command recall, as you noted,
    but actual csh never has; it only supported the `!` style
    history mechanism.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From chrisq@21:1/5 to Lawrence D'Oliveiro on Tue Jan 9 14:19:50 2024
    On 1/9/24 02:27, Lawrence D'Oliveiro wrote:
    On Mon, 8 Jan 2024 18:25:07 -0000 (UTC), Simon Clubley wrote:

    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    But not as powerful as the “find” command. I find if I need to do more complex types of file-filtering, I don’t bother with globbing, I go straight to find.

    In agreement there. Very useful for whole file system copies:

    #!/bin/sh
    #
    # Copy Filesystem to Filesystem
    #
    cd $1
    find . -print -depth | cpio -pdmuV $2

    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Lawrence D'Oliveiro on Tue Jan 9 19:32:19 2024
    On 2024-01-08, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Mon, 8 Jan 2024 14:21:18 -0000 (UTC), Simon Clubley wrote:

    Things I would like to see in bash on Linux:

    Ctrl-T

    The terminal driver is one part of VMS that I remember fondly. But in *nix systems, terminal drivers are ?character devices?, and there is no concept
    of I/O request packets--unless you do all your driver calls via ioctl, I guess.


    FreeBSD supports it, and as already mentioned, it's implemented there
    as a signal.

    I don?t feel the need for CTRL/T simply because I have something like a
    dozen or two dozen terminal sessions open at any one time, and it is easy enough to check up on a hung-looking process from another session. I can
    even rummage around in procfs to check the status of open files and memory usage in the problem process, which is way more than you can do with CTRL/
    T anyway.

    Programs can intercept Ctrl-T and output program-specific information.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Scott Dorsey on Tue Jan 9 19:22:26 2024
    On 2024-01-08, Scott Dorsey <kludge@panix.com> wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

    It also has much more powerful pattern matching than DCL offers, which
    is why I would like to see it on VMS.

    regexps are built into a lot of Unix utilities at fairly low levels and
    this is incredibly powerful.

    But I cannot say "mv *.txt *.dat" in order to change every file extension
    in the current working directory. This is the downside.

    On Linux, you can try the following:

    https://man7.org/linux/man-pages/man1/rename.1.html

    As per the manpage advice, make sure you _always_ do it on a copy of
    the files. Also be aware that there have been multiple versions of the
    rename command across different distributions, so always check the
    manpage first.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Single Stage to Orbit on Tue Jan 9 19:34:52 2024
    On 2024-01-09, Single Stage to Orbit <alex.buell@munted.eu> wrote:
    On Mon, 2024-01-08 at 10:37 -0500, Dave Froble wrote:
    Things I would like to see from bash in DCL:

    Ya know Simon, JF once asked for password completion. Not all
    desires are reasonable.

    The mind boggles.

    In case you never encountered him, JF was just being JF when he
    made that suggestion. :-) Wonder what he is up to these days...

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Simon Clubley on Tue Jan 9 20:14:06 2024
    On Tue, 9 Jan 2024 19:22:26 -0000 (UTC), Simon Clubley wrote:

    https://man7.org/linux/man-pages/man1/rename.1.html

    Also this one:
    <https://manpages.ubuntu.com/manpages/bionic/man1/mmv.1.html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Hoffman@21:1/5 to Simon Clubley on Tue Jan 9 15:36:29 2024
    On 2024-01-09 19:34:52 +0000, Simon Clubley said:

    On 2024-01-09, Single Stage to Orbit <alex.buell@munted.eu> wrote:
    On Mon, 2024-01-08 at 10:37 -0500, Dave Froble wrote:
    Things I would like to see from bash in DCL:

    Ya know Simon, JF once asked for password completion. Not all desires
    are reasonable.

    The mind boggles.

    In case you never encountered him, JF was just being JF when he made
    that suggestion. :-) Wonder what he is up to these days...

    JF has been directing energy and attention at various and entirely
    worthy goals, both within Montral and further afield.

    As for OpenVMS, two-factor authentication with FIDO or ilk would be interesting, now that USB is available on most boxes.

    Password completion is available for modern APIs via password managers,
    but not much accesses and manages OpenVMS via https or ilk.

    (Yeah, I know it was meant a joke.)



    --
    Pure Personal Opinion | HoffmanLabs LLC

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to chrisq on Tue Jan 9 20:16:15 2024
    On Tue, 9 Jan 2024 14:19:50 +0000, chrisq wrote:

    Very useful for whole file system copies:

    I use rsync for that. It also does incremental updates.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Bob Eager on Tue Jan 9 20:34:57 2024
    On 9 Jan 2024 08:49:07 GMT, Bob Eager wrote:

    But at that point I use other labguages.

    Which I have done. But, you know, it turns out bash has one or two more
    useful capabilities up its sleeve than you might give it credit for.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Eager@21:1/5 to Lawrence D'Oliveiro on Tue Jan 9 23:57:19 2024
    On Tue, 09 Jan 2024 20:34:57 +0000, Lawrence D'Oliveiro wrote:

    On 9 Jan 2024 08:49:07 GMT, Bob Eager wrote:

    But at that point I use other labguages.

    Which I have done. But, you know, it turns out bash has one or two more useful capabilities up its sleeve than you might give it credit for.

    Oh, I've examined the documentation (and books) in detail. But by that
    time, I'd been using REXX for years, and it does all I need. It's
    surprisingly powerful.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Bob Eager on Wed Jan 10 00:11:24 2024
    On 9 Jan 2024 23:57:19 GMT, Bob Eager wrote:

    On Tue, 09 Jan 2024 20:34:57 +0000, Lawrence D'Oliveiro wrote:

    On 9 Jan 2024 08:49:07 GMT, Bob Eager wrote:

    But at that point I use other labguages.

    Which I have done. But, you know, it turns out bash has one or two more
    useful capabilities up its sleeve than you might give it credit for.

    Oh, I've examined the documentation (and books) in detail. But by that
    time, I'd been using REXX for years, and it does all I need. It's surprisingly powerful.

    I had a look at the Wikipedia overview
    <https://en.wikipedia.org/wiki/Rexx>, and I see it gushes a lot over the
    PARSE statement, but it doesn’t seem to have regular expressions. Is that overview out of date?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Tue Jan 9 19:35:37 2024
    On 1/9/2024 2:32 PM, Simon Clubley wrote:
    On 2024-01-08, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    I don?t feel the need for CTRL/T simply because I have something like a
    dozen or two dozen terminal sessions open at any one time, and it is easy
    enough to check up on a hung-looking process from another session. I can
    even rummage around in procfs to check the status of open files and memory >> usage in the problem process, which is way more than you can do with CTRL/ >> T anyway.

    Programs can intercept Ctrl-T and output program-specific information.

    Yes - it is a choice whether to use DCL default or a program
    specific handler.

    $ type some1.c
    #include <stdio.h>

    int main(int argc, char *argv[])
    {
    puts("Press enter to exit");
    getchar();
    return 0;
    }
    $ cc some1
    $ link some1
    $ r some1
    Press enter to exit

    ARNE4::ARNE 20:31:33 some1 CPU=00:00:12.63 PF=95154 IO=13861 MEM=330 ARNE4::ARNE 20:31:33 some1 CPU=00:00:12.63 PF=95155 IO=13862 MEM=331 ARNE4::ARNE 20:31:34 some1 CPU=00:00:12.63 PF=95155 IO=13863 MEM=331

    $ type some2.c
    #include <stdio.h>

    #include <descrip.h>
    #include <iodef.h>
    #include <libclidef.h>
    #include <lib$routines.h>
    #include <starlet.h>

    static int n = 0;

    void catcher(int c)
    {
    n++;
    printf("You pressed CTRL/T %d times\n", n);
    }

    int main(int argc, char *argv[])
    {
    long newmask, oldmask, oobmask;
    $DESCRIPTOR(ttdesc, "TT:");
    short chan;
    newmask = LIB$M_CLI_CTRLT;
    lib$disable_ctrl(&newmask, &oldmask);
    sys$assign(&ttdesc, &chan, 0, 0);
    oobmask = 1 << ('T' - 'A');
    sys$qiow(0, chan, IO$_SETMODE|IO$M_OUTBAND, 0, 0, 0, catcher,
    &oobmask, 0, 0, 0, 0);
    puts("Press enter to exit");
    getchar();
    lib$enable_ctrl(&oldmask);
    sys$dassgn(chan);
    return 0;
    }
    $ cc some2
    $ link some2
    $ r some2
    Press enter to exit

    You pressed CTRL/T 1 times
    You pressed CTRL/T 2 times
    You pressed CTRL/T 3 times

    Arne

    PS: And note that I managed to get something strongly VMS
    related into the post!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Eager@21:1/5 to Lawrence D'Oliveiro on Wed Jan 10 10:00:57 2024
    On Wed, 10 Jan 2024 00:11:24 +0000, Lawrence D'Oliveiro wrote:

    On 9 Jan 2024 23:57:19 GMT, Bob Eager wrote:

    On Tue, 09 Jan 2024 20:34:57 +0000, Lawrence D'Oliveiro wrote:

    On 9 Jan 2024 08:49:07 GMT, Bob Eager wrote:

    But at that point I use other labguages.

    Which I have done. But, you know, it turns out bash has one or two
    more useful capabilities up its sleeve than you might give it credit
    for.

    Oh, I've examined the documentation (and books) in detail. But by that
    time, I'd been using REXX for years, and it does all I need. It's
    surprisingly powerful.

    I had a look at the Wikipedia overview
    <https://en.wikipedia.org/wiki/Rexx>, and I see it gushes a lot over the PARSE statement, but it doesn’t seem to have regular expressions. Is
    that overview out of date?

    REXX is a sparse language. But it has lots of libraries, and there are
    regexp libraries.

    Personally, I think regexps are overrated! And I first started using them
    in 1975.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Lawrence D'Oliveiro on Wed Jan 10 13:16:56 2024
    On 2024-01-09, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Tue, 9 Jan 2024 14:19:50 +0000, chrisq wrote:

    Very useful for whole file system copies:

    I use rsync for that. It also does incremental updates.

    Likewise. You can also run it over a ssh transport when syncing between
    two different systems. You can also run it a second time in checksum mode
    to make sure nothing else gets transferred (I use this as a verify pass).

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Bob Eager on Wed Jan 10 08:38:18 2024
    On 1/10/2024 5:00 AM, Bob Eager wrote:
    On Wed, 10 Jan 2024 00:11:24 +0000, Lawrence D'Oliveiro wrote:
    On 9 Jan 2024 23:57:19 GMT, Bob Eager wrote:
    Oh, I've examined the documentation (and books) in detail. But by that
    time, I'd been using REXX for years, and it does all I need. It's
    surprisingly powerful.

    I had a look at the Wikipedia overview
    <https://en.wikipedia.org/wiki/Rexx>, and I see it gushes a lot over the
    PARSE statement, but it doesn’t seem to have regular expressions. Is
    that overview out of date?

    REXX is a sparse language. But it has lots of libraries, and there are
    regexp libraries.

    Personally, I think regexps are overrated! And I first started using them
    in 1975.

    There is the famous quote:

    <quote>
    Some people, when confronted with a problem, think "I know, I'll use
    regular expressions." Now they have two problems.
    </quote>

    It is an obscure syntax.

    But it is powerful and very widely available (small differences but
    available), so my conclusion is: learn it.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Eager@21:1/5 to All on Wed Jan 10 14:08:59 2024
    On Wed, 10 Jan 2024 08:38:18 -0500, Arne Vajhøj wrote:

    On 1/10/2024 5:00 AM, Bob Eager wrote:
    On Wed, 10 Jan 2024 00:11:24 +0000, Lawrence D'Oliveiro wrote:
    On 9 Jan 2024 23:57:19 GMT, Bob Eager wrote:
    Oh, I've examined the documentation (and books) in detail. But by
    that time, I'd been using REXX for years, and it does all I need.
    It's surprisingly powerful.

    I had a look at the Wikipedia overview
    <https://en.wikipedia.org/wiki/Rexx>, and I see it gushes a lot over
    the PARSE statement, but it doesn’t seem to have regular expressions.
    Is that overview out of date?

    REXX is a sparse language. But it has lots of libraries, and there are
    regexp libraries.

    Personally, I think regexps are overrated! And I first started using
    them in 1975.

    There is the famous quote:

    <quote>
    Some people, when confronted with a problem, think "I know, I'll use
    regular expressions." Now they have two problems.
    </quote>

    It is an obscure syntax.

    But it is powerful and very widely available (small differences but available), so my conclusion is: learn it.

    Oh, I learned it. Back in the 1970s, and I've kept up to date. But they
    are still overrated.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to news0009@eager.cx on Wed Jan 10 18:04:16 2024
    In article <l07mnrFklcmU4@mid.individual.net>,
    Bob Eager <news0009@eager.cx> wrote:
    On Wed, 10 Jan 2024 08:38:18 -0500, Arne Vajhøj wrote:
    On 1/10/2024 5:00 AM, Bob Eager wrote:
    On Wed, 10 Jan 2024 00:11:24 +0000, Lawrence D'Oliveiro wrote:
    On 9 Jan 2024 23:57:19 GMT, Bob Eager wrote:
    Oh, I've examined the documentation (and books) in detail. But by
    that time, I'd been using REXX for years, and it does all I need.
    It's surprisingly powerful.

    I had a look at the Wikipedia overview
    <https://en.wikipedia.org/wiki/Rexx>, and I see it gushes a lot over
    the PARSE statement, but it doesn’t seem to have regular expressions. >>>> Is that overview out of date?

    REXX is a sparse language. But it has lots of libraries, and there are
    regexp libraries.

    Personally, I think regexps are overrated! And I first started using
    them in 1975.

    There is the famous quote:

    <quote>
    Some people, when confronted with a problem, think "I know, I'll use
    regular expressions." Now they have two problems.
    </quote>

    It is an obscure syntax.

    But it is powerful and very widely available (small differences but
    available), so my conclusion is: learn it.

    Oh, I learned it. Back in the 1970s, and I've kept up to date. But they
    are still overrated.

    That's sort of a weird take. Regular expressions, in their
    purest form, are simply a notation for denotating elements of
    the set of regular languages. It turns out that they're useful
    for all sorts of applications. They may be overused, but
    describing them as "overrated" kind of strikes me as being
    similar to describing algebra as overrated.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Bob Eager on Wed Jan 10 20:00:05 2024
    On 10 Jan 2024 10:00:57 GMT, Bob Eager wrote:

    Personally, I think regexps are overrated! And I first started using
    them in 1975.

    How about starting with a simple thing, like being able to treat multiple separators as one:

    re.split(r"\s+", "the quick brown fox")

    giving

    ['the', 'quick', 'brown', 'fox']

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Simon Clubley on Wed Jan 10 20:11:24 2024
    On Wed, 10 Jan 2024 13:16:56 -0000 (UTC), Simon Clubley wrote:

    On 2024-01-09, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Tue, 9 Jan 2024 14:19:50 +0000, chrisq wrote:

    Very useful for whole file system copies:

    I use rsync for that. It also does incremental updates.

    Likewise. You can also run it over a ssh transport when syncing between
    two different systems. You can also run it a second time in checksum
    mode to make sure nothing else gets transferred (I use this as a verify pass).

    And, with the --link-dest option, you can do incremental backups that
    look, for restoration purposes, just like full backups.

    A powerful tool, with a million uses.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Bob Eager on Wed Jan 10 22:12:29 2024
    On 10 Jan 2024 21:59:20 GMT, Bob Eager wrote:

    Perhaps 'overused' is a better term. I see a lot of instances where they
    are simply not the right tool for the job. I use them where they are appropriate.

    The main thing to realize is that REs are a Chomsky Type 3 grammar. In
    simple terms, they cannot count arbitrarily-nested parentheses. Once
    you grasp this point, you will have a better idea when not to use them <https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454>.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Eager@21:1/5 to Dan Cross on Wed Jan 10 21:59:20 2024
    On Wed, 10 Jan 2024 18:04:16 +0000, Dan Cross wrote:

    In article <l07mnrFklcmU4@mid.individual.net>,
    Bob Eager <news0009@eager.cx> wrote:
    On Wed, 10 Jan 2024 08:38:18 -0500, Arne Vajhøj wrote:
    On 1/10/2024 5:00 AM, Bob Eager wrote:
    On Wed, 10 Jan 2024 00:11:24 +0000, Lawrence D'Oliveiro wrote:
    On 9 Jan 2024 23:57:19 GMT, Bob Eager wrote:
    Oh, I've examined the documentation (and books) in detail. But by
    that time, I'd been using REXX for years, and it does all I need.
    It's surprisingly powerful.

    I had a look at the Wikipedia overview
    <https://en.wikipedia.org/wiki/Rexx>, and I see it gushes a lot over >>>>> the PARSE statement, but it doesn’t seem to have regular
    expressions.
    Is that overview out of date?

    REXX is a sparse language. But it has lots of libraries, and there
    are regexp libraries.

    Personally, I think regexps are overrated! And I first started using
    them in 1975.

    There is the famous quote:

    <quote>
    Some people, when confronted with a problem, think "I know, I'll use
    regular expressions." Now they have two problems.
    </quote>

    It is an obscure syntax.

    But it is powerful and very widely available (small differences but
    available), so my conclusion is: learn it.

    Oh, I learned it. Back in the 1970s, and I've kept up to date. But they
    are still overrated.

    That's sort of a weird take. Regular expressions, in their purest form,
    are simply a notation for denotating elements of the set of regular languages. It turns out that they're useful for all sorts of
    applications. They may be overused, but describing them as "overrated"
    kind of strikes me as being similar to describing algebra as overrated.

    Perhaps 'overused' is a better term. I see a lot of instances where they
    are simply not the right tool for the job. I use them where they are appropriate.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Eager@21:1/5 to Lawrence D'Oliveiro on Wed Jan 10 22:30:13 2024
    On Wed, 10 Jan 2024 22:12:29 +0000, Lawrence D'Oliveiro wrote:

    On 10 Jan 2024 21:59:20 GMT, Bob Eager wrote:

    Perhaps 'overused' is a better term. I see a lot of instances where
    they are simply not the right tool for the job. I use them where they
    are appropriate.

    The main thing to realize is that REs are a Chomsky Type 3 grammar. In
    simple terms, they cannot count arbitrarily-nested parentheses. Once you grasp this point, you will have a better idea when not to use them <https://stackoverflow.com/questions/1732348/regex-match-open-tags-
    except-xhtml-self-contained-tags/1732454#1732454>.

    I know that. But many people don't.

    (I taught compiler theory and practice for many years!)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Bob Eager on Wed Jan 10 23:09:28 2024
    On 10 Jan 2024 22:30:13 GMT, Bob Eager wrote:

    (I taught compiler theory and practice for many years!)

    Cool! Have you heard of these new-fangled “PEG” things? Python is using
    one for its parser now.

    Perhaps they could be used for more powerful pattern-matching purposes
    than REs. Or maybe they will simply introduce their own pitfalls, if not
    used with care, like undecidability and endless loops.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Simon Clubley on Wed Jan 10 23:23:35 2024
    On Mon, 8 Jan 2024 14:21:18 -0000 (UTC), Simon Clubley wrote:

    Filename globbing.

    Coming back to this, it’s worth pointing out that you cannot simply add features, willy-nilly, to a framework that was not designed with them in
    mind.

    Consider how the whole VMS mindset expects the command-line to work: there
    is a distinction between filespecs separated by spaces and those separated
    by commas, and even plus-signs. The CLI never does wildcard expansion, and
    on the one hand this puts the burden on the program (which has the
    powerful RMS $PARSE service to call on) to expand input filespecs, and on
    the other hand it allows wildcards to appear in output filespecs as well (again, supported by $PARSE) to indicate “use the same value here as in
    the input filespec”.

    That latter meaning is something I have sometimes missed on *nix systems.

    In the *nix world, there is actually no requirement for filename globbing
    to happen in a command at all. Shells usually do it, and they usually
    provide a way to tell them not to do it. (If only because, believe it or
    not, those globbing wildcard characters are valid in filenames, too.) If
    one user program is directly spawning another, without going through a
    shell, then it has to explicitly call some library routine to do globbing, otherwise it doesn’t happen.

    There is no equivalent to CLD files in the *nix world. (In my time on VMS,
    I found them too fiddly to use, anyway, and relied on a simple “foreign” command using LIB$TPARSE instead.) But one thing that improves the
    situation is that the “command line” is not a simple string, but an array of strings. And by default the shell will do word-splitting on the command
    line the user passes, to build this array. So it is possible to implement
    very simple option parsing in any program, without resorting to very
    elaborate libraries, to support a useful range of command-line options.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Lawrence D'Oliveiro on Thu Jan 11 13:52:52 2024
    On 2024-01-10, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Mon, 8 Jan 2024 14:21:18 -0000 (UTC), Simon Clubley wrote:

    Filename globbing.

    Coming back to this, it?s worth pointing out that you cannot simply add features, willy-nilly, to a framework that was not designed with them in mind.

    Consider how the whole VMS mindset expects the command-line to work: there
    is a distinction between filespecs separated by spaces and those separated
    by commas, and even plus-signs. The CLI never does wildcard expansion, and
    on the one hand this puts the burden on the program (which has the
    powerful RMS $PARSE service to call on) to expand input filespecs, and on
    the other hand it allows wildcards to appear in output filespecs as well (again, supported by $PARSE) to indicate ?use the same value here as in
    the input filespec?.


    Fine. Then add the globbing pattern capabilities to the current VMS wildcard lookup APIs without changing anything else. That gives you the same ability
    to use more powerful pattern matching expressions on VMS without having to change anything else in your code.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Lawrence D'Oliveiro on Thu Jan 11 15:37:03 2024
    On 1/10/2024 6:23 PM, Lawrence D'Oliveiro wrote:
    Consider how the whole VMS mindset expects the command-line to work: there
    is a distinction between filespecs separated by spaces and those separated
    by commas, and even plus-signs. The CLI never does wildcard expansion, and
    on the one hand this puts the burden on the program (which has the
    powerful RMS $PARSE service to call on) to expand input filespecs,

    Note that it is SYS$SEARCH that does the heavy lifting in this regard. SYS$PARSE is just for prepping.

    and on
    the other hand it allows wildcards to appear in output filespecs as well (again, supported by $PARSE) to indicate “use the same value here as in
    the input filespec”.

    Yes.

    There is no equivalent to CLD files in the *nix world. (In my time on VMS,
    I found them too fiddly to use, anyway, and relied on a simple “foreign” command using LIB$TPARSE instead.) But one thing that improves the
    situation is that the “command line” is not a simple string, but an array of strings. And by default the shell will do word-splitting on the command line the user passes, to build this array. So it is possible to implement very simple option parsing in any program, without resorting to very elaborate libraries, to support a useful range of command-line options.

    That is what CLD does.

    And a lot simpler than LIB$GET_FOREIGN and LIB$T[ABLE]_PARSE.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Simon Clubley on Thu Jan 11 22:26:43 2024
    On Thu, 11 Jan 2024 13:52:52 -0000 (UTC), Simon Clubley wrote:

    Fine. Then add the globbing pattern capabilities to the current VMS
    wildcard lookup APIs without changing anything else. That gives you the
    same ability to use more powerful pattern matching expressions on VMS
    without having to change anything else in your code.

    I’m not really sure that’s worthwhile. One could argue that the existing VMS wildcard patterns are already equivalent in power (or a bit beyond, in
    the case of “...”), based on the corresponding constructs in the filename specs.

    Regular expressions, on the other hand, are somewhat more powerful. I did
    one project where I had to do my own globbing against user-provided
    patterns in the usual shell-wildcard syntax, and I found it easier to
    convert those wildcards to RE patterns, and use those to scan against a
    list of filenames, than to use the provided glob-expansion services.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Lawrence D'Oliveiro on Fri Jan 12 13:21:42 2024
    On 2024-01-11, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Thu, 11 Jan 2024 13:52:52 -0000 (UTC), Simon Clubley wrote:

    Fine. Then add the globbing pattern capabilities to the current VMS
    wildcard lookup APIs without changing anything else. That gives you the
    same ability to use more powerful pattern matching expressions on VMS
    without having to change anything else in your code.

    I?m not really sure that?s worthwhile. One could argue that the existing
    VMS wildcard patterns are already equivalent in power (or a bit beyond, in the case of ?...?), based on the corresponding constructs in the filename specs.


    The main thing missing on VMS is that you can't use a grouping
    operator such as [a-d] to restrict the files selected or to select
    everyting not in the grouping operator. There's nothing similar
    to the {} expansion operator either.

    I use that kind of selection criteria all the time on Linux.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Simon Clubley on Fri Jan 12 20:17:02 2024
    On Fri, 12 Jan 2024 13:21:42 -0000 (UTC), Simon Clubley wrote:

    The main thing missing on VMS is that you can't use a grouping
    operator such as [a-d] to restrict the files selected or to select
    everyting not in the grouping operator.

    Ah, true. I suppose that could be added as a new kind of wildcard option
    to the existing wildcard syntax. After all, there is no shortage of
    characters that are currently illegal in filespecs, that could be used. ;)

    For those who are wondering about the usefulness of this on *nix systems,
    here

    ls -ld ~/.[!.]*

    is a command to list all dotfiles/dotdirectories in my home directory.

    (As to why they need to clutter up the top level of my home directory, is another peeve.)

    (As to why every directory needs to contain those useless “.” and “..” entries, is yet another peeve.)

    There's nothing similar to the {} expansion operator either.

    That's not in POSIX, that’s a bash-ism. And it’s not really a “wildcard”,
    either.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Froble@21:1/5 to Simon Clubley on Fri Jan 12 15:19:12 2024
    On 1/12/2024 8:21 AM, Simon Clubley wrote:
    On 2024-01-11, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Thu, 11 Jan 2024 13:52:52 -0000 (UTC), Simon Clubley wrote:

    Fine. Then add the globbing pattern capabilities to the current VMS
    wildcard lookup APIs without changing anything else. That gives you the
    same ability to use more powerful pattern matching expressions on VMS
    without having to change anything else in your code.

    I?m not really sure that?s worthwhile. One could argue that the existing
    VMS wildcard patterns are already equivalent in power (or a bit beyond, in >> the case of ?...?), based on the corresponding constructs in the filename
    specs.


    The main thing missing on VMS is that you can't use a grouping
    operator such as [a-d] to restrict the files selected or to select
    everyting not in the grouping operator. There's nothing similar
    to the {} expansion operator either.

    I use that kind of selection criteria all the time on Linux.

    Simon.


    Maybe you do, but, in the past I've done the same on VMS, and more.

    Now, to be specific, I read the above to be select filenames beginning with the letters a thru d. Is that correct?

    --
    David Froble Tel: 724-529-0450
    Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
    DFE Ultralights, Inc.
    170 Grimplin Road
    Vanderbilt, PA 15486

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to m6502x64@gmail.com on Mon Jan 15 13:35:24 2024
    On 2024-01-12, mjos_examine <m6502x64@gmail.com> wrote:

    $ dir *.txt

    Directory DKA100:[test]

    atest.txt;1 btest.txt;1 ctest.txt;1 dtest.txt;1 etest.txt;1 ftest.txt;1 gtest.txt;1

    Total of 7 files.

    $
    $
    $ type testglob.c

    [snip]

    Cute. :-) Now get that added to the native VMS filename lookup API using VMS-suitable syntax and make it available in DCL... :-)

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Dave Froble on Mon Jan 15 13:33:10 2024
    On 2024-01-12, Dave Froble <davef@tsoft-inc.com> wrote:
    On 1/12/2024 8:21 AM, Simon Clubley wrote:
    On 2024-01-11, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Thu, 11 Jan 2024 13:52:52 -0000 (UTC), Simon Clubley wrote:

    Fine. Then add the globbing pattern capabilities to the current VMS
    wildcard lookup APIs without changing anything else. That gives you the >>>> same ability to use more powerful pattern matching expressions on VMS
    without having to change anything else in your code.

    I?m not really sure that?s worthwhile. One could argue that the existing >>> VMS wildcard patterns are already equivalent in power (or a bit beyond, in >>> the case of ?...?), based on the corresponding constructs in the filename >>> specs.


    The main thing missing on VMS is that you can't use a grouping
    operator such as [a-d] to restrict the files selected or to select
    everyting not in the grouping operator. There's nothing similar
    to the {} expansion operator either.

    I use that kind of selection criteria all the time on Linux.


    Maybe you do, but, in the past I've done the same on VMS, and more.

    Now, to be specific, I read the above to be select filenames beginning with the
    letters a thru d. Is that correct?


    Yes. You can also negate the pattern to find everything not in that pattern.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Andreas Eder on Mon Jan 22 06:53:10 2024
    On Mon, 22 Jan 2024 07:16:16 +0100, Andreas Eder wrote:

    On Fr 12 Jan 2024 at 20:17, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    For those who are wondering about the usefulness of this on *nix
    systems, here

    ls -ld ~/.[!.]*

    is a command to list all dotfiles/dotdirectories in my home directory.

    I think you meant

    ls -ld ~/.[^.]*

    That might work in Bash, but the first is POSIX-compliant.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Eder@21:1/5 to Lawrence D'Oliveiro on Mon Jan 22 07:16:16 2024
    On Fr 12 Jan 2024 at 20:17, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    Ah, true. I suppose that could be added as a new kind of wildcard option
    to the existing wildcard syntax. After all, there is no shortage of characters that are currently illegal in filespecs, that could be used. ;)

    For those who are wondering about the usefulness of this on *nix systems, here

    ls -ld ~/.[!.]*

    is a command to list all dotfiles/dotdirectories in my home directory.

    I think you meant

    ls -ld ~/.[^.]*

    'Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to a_eder_muc@web.de on Mon Jan 22 13:21:20 2024
    In article <8734up7v0v.fsf@eder.anydns.info>,
    Andreas Eder <a_eder_muc@web.de> wrote:
    On Fr 12 Jan 2024 at 20:17, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    Ah, true. I suppose that could be added as a new kind of wildcard option
    to the existing wildcard syntax. After all, there is no shortage of
    characters that are currently illegal in filespecs, that could be used. ;) >>
    For those who are wondering about the usefulness of this on *nix systems,
    here

    ls -ld ~/.[!.]*

    is a command to list all dotfiles/dotdirectories in my home directory.

    I think you meant

    ls -ld ~/.[^.]*

    The POSIX shell notation is kind of strange; it was, as I was
    told, originally based on ksh88, which uses this notation for
    negation in pattern matching. In particular, section 2.13.1 of
    the current standard says that `!` takes the place of `^` in
    shell pattern matching: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13

    Beats me why Korn chose this syntax. Historically, the 7th
    Edition shell by Bourne didn't support negation in patterns
    at all.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)