[Info-vax] Long uptime cut short by Hurricane Sandy
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Thu Jan 31 15:07:04 EST 2013
In article <amvog5F77bmU1 at mid.individual.net>, billg999 at cs.uofs.edu (Bill Gunshannon) writes:
>In article <00ACE32F.26E347FC at sendspamhere.org>,
> VAXman- @SendSpamHere.ORG writes:
>> In article <kee28h$6eo$1 at dont-email.me>, Stephen Hoffman <seaohveh at hoffmanlabs.invalid> writes:
>>>On 2013-01-31 14:13:55 +0000, VAXman- @SendSpamHere.ORG said:
>>>
>>>filename=$filenameprefix"_`date +%Y%m%d%H%M%S`.dmp"
>>>
>>>
>>>$ filename = filenameprefix + "_" + f$cvtime(,,"YEAR") +
>>>f$cvtime(,,"MONTH") + f$cvtime(,,"DAY") + f$cvtime(,,"HOUR") +
>>>f$cvtime(,,"MINUTE") + f$cvtime(,,"SECOND") + ".dmp"
>>>
>>
>> $ filename = filenameprefix+"_"+F$cvtime(,"COMPARISON")-"-"-"-"-" "-":"-":"-"."+".dmp"
>
>Lots of snips here but I only kept what mattered.
>
>What was it people were saying about Unix being cryptic? I would
>expect that most people could figure out what the Unix example
>does, and Hoff's isn't too bad (although rather verbose) but just
>how would anyone determine what the function of VAXMan's example
>was?
F$cvtime(,"COMPARISON") returns a comparison time 'YYYY-MM-DD HH:MM:SS.CC'.
The - subtracts from that string. So, -"-"-"-"-" "-":"-":"-"." removes the
punctuation in the comparison time string.
If it were up to me, I'd have used the F$fao() lexical and the many time
formatters available in VMS but, alas, those were never incorporated into
$FAO; they're only recognized when used with/by LIB$INIT_DATE_TIME_CONTEXT
and LIB$FORMAT_DATE_TIME. If these had been incorporated into SYS$FAO,
F$fao("!Y4!MN0!D0!H04!M0!S0",0) I c/would have been used and this closely
mirrors the *IX bash 'date' with format string. Also, I do find the VMS
formatters easier to remember instead of the zany assigned upper and lower
case format specifiers for the many time fields in *IX.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
Well I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list