slicing the date
R. E. Mackey
mackey at ihlpb.ATT.COM
Thu Mar 30 01:25:14 AEST 1989
In article <216000010 at s.cs.uiuc.edu>, carroll at s.cs.uiuc.edu writes:
> [......] The question is, how can I cut up the output of
> date to put the hours, minutes, and seconds into seperate variables? Thanks!
The line
eval `date '+hr=%H;min=%M;sec=%S'`
will set
hr to the current hour,
min to the current minute, and
sec to the current second.
You're welcome.
--
Ron Mackey - AT&T Bell Laboratories UUCP: att!ihlpb!mackey
2000 N. Naperville Road WORK: (312) 979-2140
Naperville, Illinois 60566 OFFICE: IH 2C-423
More information about the Comp.unix.questions
mailing list