Inserting the date into a (t)csh array

Fabrice Le Metayer fabrice at sj.ate.slb.com
Fri Sep 7 11:17:59 AEST 1990


rantapaa at cs.umn.edu (Erik E. Rantapaa) writes:

> While I've got your attention, I should also ask if anyone
> has a better way to do the following in tcsh:
>
>     echo "set today = (`date`)" > /tmp/.date
>     source -h /tmp/.date
>     !set:s/:/ /:s/:/ /

Try :

	% eval `date '+set today=(%a %h %d %H %M %S 19%y)'`
	% echo $today
	Thu Sep 06 18 13 08 1990

The only problem is that you don't get the "CDT" string before the year.
If you can live without it, your problem is solved.

Regards,

--
Fabrice
--
Fabrice  Le Metayer              DOMAIN : fabrice at sj.ate.slb.com
Schlumberger Technologies - ATE  UUCP   : {amdahl,decwrl,uunet}!sjsca4!fabrice
San Jose, CA  95110              BELL   : (408) 437-5114



More information about the Comp.unix.shell mailing list