home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!destroyer!ncar!noao!amethyst!organpipe.uug.arizona.edu!argus.lpl.Arizona.EDU!ron
- From: ron@argus.lpl.Arizona.EDU (Ron Watkins)
- Newsgroups: comp.unix.misc
- Subject: Regular expression, vi and sed
- Keywords: RE, VI, SED
- Message-ID: <1992Dec24.050436.13946@organpipe.uug.arizona.edu>
- Date: 24 Dec 92 05:04:36 GMT
- Sender: news@organpipe.uug.arizona.edu
- Organization: Lunar and Planetary Lab, U of AZ
- Lines: 16
-
- I have a problem which I don't understand. First, I would like to delete
- a bunch of blank spaces that I have in a very large file. VI can't do it
- because there isn't enough space in /var or /tmp or whatever. So I tried
- using sed as follows:
- sed -e "s/^ +//" < in > out"
- and it didn't work. Why? My understanding of regular expressions tells me that
- this would be any number of blanks at the beginning of the line. But it
- doesnt' seem to work under SUNOS. Any ideas? How should I proceed in solving
- this problem?
- Please use e-mail. Thanks,
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Ron Watkins [ron@argus.lpl.arizona.edu] / _____ /
- 931 Gould-Simpson bldg. / / / /
- University of Arizona / /____/ /
- Tucson, AZ. 85721 / / /
- (602) 621-8606 /_____ unar & / lanetary /_____ ab.
-