home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / shell / 3499 < prev    next >
Encoding:
Text File  |  1992-08-16  |  890 b   |  30 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!casbah.acns.nwu.edu!navarra
  3. From: navarra@casbah.acns.nwu.edu (John Navarra)
  4. Subject: Re: searching for 1st occurrence
  5. Message-ID: <1992Aug17.001516.29088@news.acns.nwu.edu>
  6. Sender: usenet@news.acns.nwu.edu (Usenet on news.acns)
  7. Organization: Northwestern University, Evanston Illinois.
  8. References: <15m8aqINN6ci@seven-up.East.Sun.COM> <1992Aug14.012156.5499@ve3ied.UUCP> <MITCH.92Aug16153742@mira.clsi>
  9. Date: Mon, 17 Aug 1992 00:15:16 GMT
  10. Lines: 18
  11.  
  12. In article <MITCH.92Aug16153742@mira.clsi> mitch@clsi (Mitchell N. Perilstein) writes:
  13. >
  14. >You can just skip the grep and do it in one step:
  15. >
  16. >    awk '/SS2/ {print; exit}' < systems
  17. >
  18.  
  19. or, you can just skip awk and do it in sed:
  20.  
  21.     sed -n '/123/{p;q;}' filename
  22.  
  23. -tms
  24.  
  25.  
  26. -- 
  27. From the Lab of the MaD ScIenTiST:
  28.                     
  29. navarra@casbah.acns.nwu.edu        
  30.