[Info-vax] Unix and DCL shells
Arne Vajhøj
arne at vajhoej.dk
Thu Jan 11 15:37:03 EST 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
More information about the Info-vax
mailing list