home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / misc / 4707 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  1.4 KB

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