home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / misc / 4721 < prev    next >
Encoding:
Text File  |  1992-12-24  |  792 b   |  26 lines

  1. Newsgroups: comp.unix.misc
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!wupost!csus.edu!netcom.com!messina
  3. From: messina@netcom.com (Tony Porczyk)
  4. Subject: Re: Regular expression, vi and sed
  5. Message-ID: <1992Dec24.234801.20080@netcom.com>
  6. Keywords: RE, VI, SED
  7. Organization: Messina Software
  8. References: <1992Dec24.050436.13946@organpipe.uug.arizona.edu>
  9. Date: Thu, 24 Dec 1992 23:48:01 GMT
  10. Lines: 14
  11.  
  12. ron@argus.lpl.Arizona.EDU (Ron Watkins) writes:
  13.  
  14. >I have a problem which I don't understand. First, I would like to delete
  15. >a bunch of blank spaces that I have in a very large file. VI can't do it
  16. >because there isn't enough space in /var or /tmp or whatever. So I tried
  17. >using sed as follows:
  18. >sed -e "s/^ +//" < in > out"
  19. >and it didn't work.
  20.  
  21. Try:
  22.  
  23. sed -e "s/^[ ]*//" < in > out
  24.  
  25. t.
  26.