slicing the date
Michael J. Chinni, SMCAR-CCS-E
mchinni at pica.army.mil
Tue Apr 4 05:29:50 AEST 1989
Alan,
I can think of two possible choices. One, you may still have access to
a SysV environment, but it may be in /usr/usg or /usr/5bin or some such. This
will allow you to use the SysV date command with its output formatting. Two, if
the above is not true, try the following (H-hours M-minutes S-seconds):
H=`date | cut -c12-19 | cut -f1 -d':'`
M=`date | cut -c12-19 | cut -f2 -d':'`
S=`date | cut -c12-19 | cut -f3 -d':'`
these depend upon date output having the HH:MM:SS in columns 12-19
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Michael J. Chinni
US Army Armament Research, Development, and Engineering Center
User to skeleton sitting at cobweb () Picatinny Arsenal, New Jersey
and dust covered terminal/desk () ARPA: mchinni at pica.army.mil
"System been down long?" () UUCP: ...!uunet!pica.army.mil!mchinni
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
More information about the Comp.unix.questions
mailing list