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

  1. Path: sparky!uunet!think.com!sdd.hp.com!decwrl!oracle!unrepliable!bounce
  2. Newsgroups: comp.databases.oracle
  3. From: sstephen@us.oracle.com
  4. Subject: Re: Spool & Trailing Blanks
  5. Message-ID: <1993Jan26.170632.1@us.oracle.com>
  6. Lines: 60
  7. Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
  8. Nntp-Posting-Host: wrvms2.us.oracle.com
  9. Organization: Oracle Corporation, USA
  10. References: <1993Jan25.133239.1@ntc02.tele.nokia.fi>
  11. Date: Wed, 27 Jan 1993 01:06:32 GMT
  12. X-Disclaimer: This message was written by an unauthenticated user
  13.               at Oracle Corporation.  The opinions expressed are those
  14.               of the user and not necessarily those of Oracle.
  15.  
  16. In article <1993Jan25.133239.1@ntc02.tele.nokia.fi>, kuismin@ntc02.tele.nokia.fi writes:
  17. >     My environment:
  18. >         * SunOS Release 4.1.3
  19. >         * Oracle SQL*Plus v.3.0.12.2.1
  20. >         * Oracle RDBMS    v.6.0.36.4.1
  21. >         * Oracle PL/SQL   v.1.0.35.1.1
  22. >     What is done?
  23. >         I'm spooling my query into a file with SQL*Plus's SPOOL command.
  24. >     What is the problem?
  25. >         1) Trailing blanks
  26. >         SQL*Plus uses LINESIZE setting and puts trailing blanks in the
  27. >         end of each line it spools.  I need to remove all these blanks!
  28. >         Can this be done by SQL*Plus?
  29. >         What unix commands could be used to do this?  I'm novice with unix.
  30. >
  31.   In UNIX, you can type :
  32.  
  33.      sed -e 's/ *$//g' myfile.lst > myfile.lis
  34.  
  35.   this says, "delete one or more blanks at the end of each line".  Works
  36. great.
  37. >         2) Unix to Dos convertion
  38. >         My final aim is to convert the spooled file, which in UNIX
  39. >         format, into DOS format.  That is, I need to put <CR><LF>
  40. >         instead of <LF> in the end of each line.
  41. >         Can this be done by SQL*Plus?
  42. >         What unix command could be used to do this? I'm novice with unix.
  43. >
  44.   Depends on how you convert it to DOS.  Most modem software alows you to
  45. specify what to do with CR/LF when the file type is TEXT.  
  46. >
  47. >     This is what I get now:
  48. >         line1 line1                      <LF>
  49. >         line2 line2 line2 line2          <LF>
  50. >         line3 line3 line3                <LF>
  51. >     This is what I want to have:
  52. >         line1 line1<CR><LF>
  53. >         line2 line2 line2 line2<CR><LF>
  54. >         line3 line3 line3<CR><LF>
  55. >     Any help is appreciated!
  56. >     -Mikko Kuismin
  57. -- 
  58. ================================================================================
  59. Scott Stephens                inet:    sstephen.us.oracle.com
  60. Oracle WorldWide Support                Redwood City, California
  61.