home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / question / 14759 < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.8 KB  |  46 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!usc!cs.utexas.edu!zaphod.mps.ohio-state.edu!malgudi.oar.net!caen!spool.mu.edu!umn.edu!csus.edu!netcom.com!dman
  3. From: dman@netcom.com (Dallman Ross)
  4. Subject: Re: Performing simple math on a numeric file from csh
  5. Message-ID: <1992Dec17.093546.9935@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. X-Newsreader: TIN [version 1.1 PL7]
  8. References: <1992Dec16.080343.24756@netcom.com>
  9. Date: Thu, 17 Dec 1992 09:35:46 GMT
  10. Lines: 34
  11.  
  12. I, Dallman Ross (dman@netcom.com), wrote:
  13. : I am trying to understand awk, but the man pages are driving me nuts. 
  14. : Anyway, I have a couple of simple files with numerics in them that I
  15. : want to do some math with.  This doesn't have to be via awk, but I've
  16. : been told that's the ticket.  Anyway, I use csh.
  17. :  
  18. : Here's what one of the files looks like:
  19. :  
  20. : > login:  Dec 15 21:40:01
  21. : > logout: Dec 15 21:40:18
  22. : > 
  23. : > login:  Dec 15 21:41:11
  24. : > logout: Dec 15 21:41:48
  25. : > 
  26. : > login:  Dec 15 22:20:08
  27. : > logout: Dec 15 22:31:44
  28. : > 
  29. :  
  30. : (No >'s in the file, of course.)  So, I want to subtract the
  31. : penultimate time figure from the last figure, and come up with
  32. : "00:11:36" as the answer for time logged in.  I only need to do the
  33. : math on the last pair.  The rest is just a running log.
  34. :  
  35. : Thanks for any advice.
  36.  
  37. Still hoping for some help on this.  One person did email me, but I
  38. haven't seen any tips on command lines yet.
  39.  
  40. --
  41.  __D_a l_l m a_n  _ R o_s s _ |dman@netcom.com  /or/  |"You sound like a man|
  42.  l  \\ l\\   /l  /\\  l\\   l |dross@well.sf.ca.us    |with a rubber nose." |
  43.  l   >)l \\ /ll /  \\ l \\  l |vox/fax: 1.510.645.1883| -- One-Lung Bill    |
  44.  l  // l  \X ll/--- \\l  \\ l |350 Perkins St., #108  |     Remmer (deceased)
  45. _l//______________________\\l_|Oakland,_CA__94610-3422|_____________________|_
  46.