home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / misc / 4783 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.2 KB  |  35 lines

  1. Newsgroups: comp.unix.misc
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!messina
  3. From: messina@netcom.com (Tony Porczyk)
  4. Subject: Re: Regular expression, vi and sed
  5. Message-ID: <1992Dec31.192852.20618@netcom.com>
  6. Keywords: RE, VI, SED
  7. Organization: Messina Software
  8. References: <1992Dec24.050436.13946@organpipe.uug.arizona.edu> <1992Dec24.234801.20080@netcom.com> <1992Dec31.070118.17956@nas.nasa.gov>
  9. Date: Thu, 31 Dec 1992 19:28:52 GMT
  10. Lines: 23
  11.  
  12. hampe@wilbur.nas.nasa.gov (Andrew F. Hampe) writes:
  13.  
  14. >In article <1992Dec24.234801.20080@netcom.com> messina@netcom.com (Tony Porczyk) writes:
  15. >>ron@argus.lpl.Arizona.EDU (Ron Watkins) writes:
  16.  
  17. >>>First, I would like to delete a bunch of blank spaces that I have in a
  18. >>>very large file.
  19. >>>sed -e "s/^ +//" < in > out"
  20. >>
  21. >>sed -e "s/^[ ]*//" < in > out
  22. >
  23. >    sed -e 's/[ ][ ]*/ /g' < in > out
  24. >
  25. >the bit with the "^" is limiting it to just the start of
  26. >the lines, or am I missing why we are trying to deal with
  27. >only the starts of lines?
  28.  
  29. Indeed, from the reg exp the original poster constructed I deduced he
  30. really wanted to get rid of all the blanks at the beginning of the
  31. lines.  After reading the original post again, I am not so sure
  32. myself.  Ron, what did you try to do exactly? 
  33.  
  34. t.
  35.