[Info-vax] Long uptime cut short by Hurricane Sandy

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Thu Jan 31 13:05:07 EST 2013


On 2013-01-31, VAXman-  @SendSpamHere.ORG <VAXman- at SendSpamHere.ORG> wrote:
> In article <kedtde$9tr$1 at dont-email.me>, Stephen Hoffman <seaohveh at hoffmanlabs.invalid> writes:
>>
>>The OpenVMS command line, system services, the language and run-time 
>>libraries and the rest are similarly limited.  Solid, but limited.
>>
>>While it's possible to do a whole lot with VMS — "Turing Complete" and 
>>all — it's increasingly involving far more work and far more time and 
>>far more effort.  Adding all this code means there's more to go wrong, 
>>too; when you need a few hundred or a few thousand lines of glue code 
>>and a {collective noun} of DCL procedures, you're adding bugs and costs.
>>
>>In terms of raw command line features and capabilities, bash completely 
>>blows the sneakers off of DCL.  It's possible to do a whole lot more in 
>>bash, and often in a whole lot less space.  Not that there aren't 
>>gnarly parts of bash, not to imply bash is the paragon of clear syntax, 
>>and not to imply bash makes a good newsreader.  (Though it would not 
>>surprise me to learn somebody's written a newsreader in bash, either.)
>>
>>Put another way, when working in DCL, I find myself missing various 
>>capabilities of bash.  Yes, you can get there.  But as Simon writes, 
>>the DCL code is more cluttered and more convoluted.  Which is just a 
>>little weird, given how convoluted and cluttered bash can and often 
>>does look.  I find myself climbing into gnv for various tasks, too.
>
> Show me... without PIPES and myriad other *IX utilities.  Compare only
> /bin/bash scripting semantics with DCL's. 
>

Hoff has shown you some examples, but I am going to take a different
approach and show some really simple examples which any DCL user should
be able to follow and appreciate.

BTW, those Unix utilities are as much a part of the shell environment on
Unix as the equivalents are a part of DCL. For example, neither environment
has a built in command to delete files; it's a external command involved
by the shell.

Some simple examples:

Instead of having to use a f$search based loop, you can iterate over a list
of files with a simple for statement and use the filename in a list of
commands to be executed. Furthermore, the list of files is immutable while
the commands are running so you don't have to worry about the context
been destroyed by your commands.

You can eliminate a good amount of filtering code by using a regex to much
more accurately identify the files you are looking for.

bash has _real_ arrays: http://tldp.org/LDP/abs/html/arrays.html

On Unix, the command to delete a tree really does what it says on the tin.

rename is far more powerful; you can specify a part of a filename to be
replaced with another string and apply this to a set of files.

When searching the _contents_ of files to find matching files, you can also
eliminate a good amount of code by using a regex to much more accurately
identify the files in the first place.

You can easily keep two file trees in sync, including deleting stale files
from the target tree, by using rsync. You can even do this with trees
located on different machines by running rsync over a ssh transport.

These are just some simple examples which every DCL user will have come
across during normal use; I certainly have. You can do all of the above
using DCL, but you have to use ugly hacks or a lot more code to achieve
the same thing.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list