Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!carroll From: carroll@s.cs.uiuc.edu Newsgroups: comp.unix.questions Subject: slicing the date Message-ID: <216000010@s.cs.uiuc.edu> Date: 27 Mar 89 21:34:00 GMT Lines: 12 Nf-ID: #N:s.cs.uiuc.edu:216000010:000:703 Nf-From: s.cs.uiuc.edu!carroll Mar 27 15:34:00 1989 Allright, I can't figure this out. I'm trying to put the current system time in my prompt. Under SysV, I can use 'cut' to pick out the seperate hours, minutes, and seconds from 'date'. For non-SysV types, 'cut' lets you pick out fields using either delimiter characters or absolute column counts. I found a way to do this using Ksh (with the pattern matchers), but it is very ugly. The question is, how can I cut up the output of date to put the hours, minutes, and seconds into seperate variables? Thanks! Alan M. Carroll "And then you say, carroll@s.cs.uiuc.edu We have the Moon, so now the Stars..." - YES CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll