home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / shell / 4769 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.0 KB

  1. Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!rdsunx!barnett
  2. From: barnett@grymoire.crd.ge.com (Bruce Barnett)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: sed question!
  5. Message-ID: <BARNETT.92Nov18092209@grymoire.crd.ge.com>
  6. Date: 18 Nov 92 14:22:09 GMT
  7. References: <1992Nov14.233254@IASTATE.EDU>
  8. Sender: usenet@crd.ge.com (Required for NNTP)
  9. Reply-To: barnett@crdgw1.ge.com
  10. Organization: GE Corp. R & D, Schenectady, NY
  11. Lines: 12
  12. In-Reply-To: owang@IASTATE.EDU's message of Sun, 15 Nov 1992 05:32:54 GMT
  13. Nntp-Posting-Host: grymoire.crd.ge.com
  14.  
  15. In article <1992Nov14.233254@IASTATE.EDU> owang@IASTATE.EDU (Ouhong Wang) writes:
  16. >         sed -n '/^.\{50\}w/p' FILE
  17.  
  18. Depends on your version of sed. Not all vendors support the \{ and \}
  19. in sed. Some vendors who use shared libraries have combined all of the
  20. different regex variations into one or two libraries. Your example
  21. works under SunOS, for instance.
  22.  
  23. Either change vendors. use perl, specify 50 "." characters, or try the GNU
  24. version of sed.
  25. --
  26. Bruce Barnett <barnett@crd.ge.com> uunet!crdgw1!barnett
  27.