home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / question / 12956 < prev    next >
Encoding:
Text File  |  1992-11-06  |  923 b   |  31 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!concert!sas!mozart.unx.sas.com!sasjqw
  3. From: sasjqw@micro.unx.sas.com (Jon White)
  4. Subject: Re: Erasing words with less than n letters
  5. Originator: sasjqw@micro.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <Bx976G.I84@unx.sas.com>
  8. Date: Thu, 5 Nov 1992 17:27:51 GMT
  9. References: <1992Nov4.180618.9183@inesc.pt> <1992Nov5.011854.25944@umbc3.umbc.edu>
  10. Nntp-Posting-Host: micro.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Lines: 17
  13.  
  14.  
  15. rouben@math9.math.umbc.edu (Rouben Rostamian) writes:
  16. : jota@iguana.inesc.pt writes:
  17. : >    Is there a way of erasing the words with less than n letters
  18. : >using unix ? sed ? awk ? The words (in a dictionary) are sorted and
  19. : >one per line.
  20. :
  21. : To print input lines containing n or more characters:
  22. :
  23. : awk 'length($0) >= n { print }'
  24.  
  25. or simply:
  26.  
  27. awk 'length >= n'
  28.  
  29. --jon
  30.  
  31.