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