Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!xadmx!mchinni@pica.army.mil From: mchinni@pica.army.mil (Michael J. Chinni, SMCAR-CCS-E) Newsgroups: comp.unix.questions Subject: Re: slicing the date Message-ID: <18926@adm.BRL.MIL> Date: 3 Apr 89 19:29:50 GMT Sender: news@adm.BRL.MIL Lines: 19 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@pica.army.mil "System been down long?" () UUCP: ...!uunet!pica.army.mil!mchinni /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/