home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / oracle / 2965 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.8 KB

  1. Path: sparky!uunet!mcsun!uknet!pyrltd!graeme
  2. From: graeme@pyra.co.uk (Graeme Sargent)
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Spool & Trailing Blanks
  5. Message-ID: <1993Jan26.112159.869@pyra.co.uk>
  6. Date: 26 Jan 93 11:21:59 GMT
  7. References: <1993Jan25.133239.1@ntc02.tele.nokia.fi>
  8. Sender: graeme@pyra.co.uk (Graeme Sargent)
  9. Reply-To: graeme@pyramid.com (Graeme Sargent)
  10. Organization: Pyramid Technology Ltd.
  11. Lines: 39
  12.  
  13. In <1993Jan25.133239.1@ntc02.tele.nokia.fi> kuismin@ntc02.tele.nokia.fi writes:
  14.  
  15. >    This is what I get now:
  16.  
  17. >        line1 line1                      <LF>
  18. >        line2 line2 line2 line2          <LF>
  19. >        line3 line3 line3                <LF>
  20.  
  21. >    This is what I want to have:
  22.  
  23. >        line1 line1<CR><LF>
  24. >        line2 line2 line2 line2<CR><LF>
  25. >        line3 line3 line3<CR><LF>
  26.  
  27. It's easy to do with UNIX:
  28.  
  29. sed -e "s/ *$//" file1 > file2
  30.  
  31. will replace all trailing blanks in "file1" with a single <CR> (^M)
  32. in "file2".
  33.  
  34. NB. to embed the <CR> in your sed command you type <CTRL>-V,<CTRL>-M
  35.  
  36. graeme
  37. --
  38. Disclaimer:    The author's opinions are his own, and not necessarily
  39.         those of Pyramid Technology Ltd. or Pyramid Technology Inc.
  40. --------------------------------------------------------------------------------
  41.       -m------- Graeme Sargent                 Voice: +44 (0)252 373035
  42.     ---mmm----- Senior Database Consultant     Fax  : +44 (0)252 373135
  43.   -----mmmmm--- Pyramid Technology Ltd.        Telex: Tell who???
  44. -------mmmmmmm- Farnborough, Hants  GU14 7PL   Email: graeme@pyra.co.uk
  45. --------------------------------------------------------------------------------
  46.     We have the technology.  The tricky bit is learning how to use it.
  47. -- 
  48. graeme
  49. --
  50. Disclaimer:    The author's opinions are his own, and not necessarily
  51.         those of Pyramid Technology Ltd. or Pyramid Technology Inc.
  52.