Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!mips!sjsca4!fabrice From: fabrice@sj.ate.slb.com (Fabrice Le Metayer) Newsgroups: comp.unix.shell Subject: Inserting the date into a (t)csh array Keywords: tcsh, csh, getting commands into the history list Message-ID: <1990Sep7.011759.17774@sj.ate.slb.com> Date: 7 Sep 90 01:17:59 GMT References: <1990Sep6.030354.27810@cs.umn.edu> Sender: news@sj.ate.slb.com Distribution: na Organization: Schlumberger Technologies, ATE division Lines: 26 rantapaa@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@sj.ate.slb.com Schlumberger Technologies - ATE UUCP : {amdahl,decwrl,uunet}!sjsca4!fabrice San Jose, CA 95110 BELL : (408) 437-5114