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

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!nwnexus!Celestial.COM!ray
  3. From: ray@Celestial.COM (Ray Jones)
  4. Subject: Re: Command to parse text...
  5. Organization: Celestial Software, Mercer Island, WA
  6. Date: Fri, 11 Dec 1992 19:45:27 GMT
  7. Message-ID: <1992Dec11.194527.7959@Celestial.COM>
  8. References: <lux.723676699@sol.UVic.CA>
  9. Lines: 22
  10.  
  11. In <lux.723676699@sol.UVic.CA> lux@sol.UVic.CA (Michael O'Henly) writes:
  12.  
  13. >    I need a command that will take a line of input that looks like
  14. >this...
  15.  
  16. >        /is/gd/.int_res/.text/.lib/.docs/filename
  17.  
  18. >    ...and return the string "filename". In other words, it's got to
  19. >return all the text between the last "/" and the end of the input
  20. >line.
  21.  
  22. >    Can you help me? Sed and regular expressions are still quite a
  23. >mystery to me...!
  24.  
  25. There is a specific command to do exactly what you want in most instances.
  26. The command is:
  27. basename
  28. -- 
  29. INTERNET:  ray@Celestial.COM   Ray A. Jones; Celestial Software
  30. UUCP:   ...!thebes!camco!ray   6641 East Mercer Way
  31.              uunet!camco!ray   Mercer Island, WA 98040; (206) 947-5591
  32. The probability of one or more spelling errors in this missive approaches
  33.