Re: Unix Date
Posted in 1992
Topics: General Discussion
mikey@tfs.COM (Mike Fischer) writes: >Mike Gordon writes: >>>>>>> >TO: Stuart Hemming >SUBJECT: Unix Date >Stuart, >Are you looking for a date conversion like this: >Thu Sep 24 11:24:40 PDT 1992 >If this is close, the Unix Command: date <return> will print this to the >terminal screen. You can pipe the date command thru the "cut" utility >to cut out specific columns within the date format, then print it on the >terminal screen or direct it into a file. >>>>>>>>> >There are two other possibilities that come to mind. One is to use awk >to acomplish the same idea that cut will. Else if you are wanting parts >of the date within a c-shell script you could do the following: >set d = `date` >set dt = "$d[2] $d[3] $d[6]" >which would result in $dt being equal to Sep 24 1992(using example above). RTFM yust use set dt=`date +"%h %d 19%y"` wich results in Sep 25 1992 Jan. -- Jan Wortelboer, University of Amsterdam Computer Science Department Email: janw@fwi.uva.nl Unix Kruislaan 403 Kamer F003 Phone: +31 20 525 7501 systems manager 1098 SJ AMSTERDAM Fax : +31 20 525 7490