[Info-vax] Long uptime cut short by Hurricane Sandy
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Thu Jan 31 12:56:02 EST 2013
On 2013-01-31 17:38:45 +0000, VAXman- @SendSpamHere.ORG said:
> In article <kee7oh$m45$1 at dont-email.me>, Stephen Hoffman
> <seaohveh at hoffmanlabs.invalid> writes:
>> On 2013-01-31 16:32:44 +0000, VAXman- @SendSpamHere.ORG said:
>>
>>> Or, skip the myriad excursions through LIB$CVT_TIME and LIB$CVT_DTIME, and
>>> let DCL do one of the things it does best...
>>>
>>> $ filename = filenameprefix+"_"+F$cvtime(,"COMPARISON")-"-"-"-"-"
>>> "-":"-":"-"."+".dmp"
>>
>> Yes. That's definitely better than what I'd posted[1].
>>
>> But you're not going to convince me that DCL is superior to bash here;
>> that printf-style notation is just plain handy.
>
> I never said that. I was trying to get the focus on the scripting lingo's
> features and not all of the utilities it can invoke.
AFAIK, no command line interpreter and no shell is ever intended to be
used in isolation.
The whole point of a CLI or of a shell is allow scripting and to allow
gluing together various executables.
IMO, Unix just happens to be better at that gluing-together than is
VMS, albeit with the Unix shells typically being more cryptic. That's
as much due to the general philospophy as anything else. Unix
classically does many small bits stitched together, where VMS does big
and all-encompassing monolithic solutions. Now is Unix perfect here?
Nope. There's no metadata around what data is shoved through the pipes
(such as character encodings, for instance), so tossing certain sorts
of data through a pipe can get... "interesting". But then this is also
the sort of solution that's seldom implemented on VMS.
>
>> [1] Pedantic: what you've posted does not produce exactly same output.
>> It's very close, but not the same.
>
> $ filename =
> filenameprefix+"_"+F$fao("!19AS",F$cvtime(,"COMPARISON"))-"-"-"-"-"
> "-":"-":"+".dmp"
Yeah. Or add the prefix and the underscore into the f$fao, as that
avoids clobbering caracters in the prefix.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list