home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!sdd.hp.com!decwrl!oracle!unrepliable!bounce
- Newsgroups: comp.databases.oracle
- From: sstephen@us.oracle.com
- Subject: Re: Spool & Trailing Blanks
- Message-ID: <1993Jan26.170632.1@us.oracle.com>
- Lines: 60
- Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
- Nntp-Posting-Host: wrvms2.us.oracle.com
- Organization: Oracle Corporation, USA
- References: <1993Jan25.133239.1@ntc02.tele.nokia.fi>
- Date: Wed, 27 Jan 1993 01:06:32 GMT
- X-Disclaimer: This message was written by an unauthenticated user
- at Oracle Corporation. The opinions expressed are those
- of the user and not necessarily those of Oracle.
-
- In article <1993Jan25.133239.1@ntc02.tele.nokia.fi>, kuismin@ntc02.tele.nokia.fi writes:
- >
- > My environment:
- > * SunOS Release 4.1.3
- > * Oracle SQL*Plus v.3.0.12.2.1
- > * Oracle RDBMS v.6.0.36.4.1
- > * Oracle PL/SQL v.1.0.35.1.1
- >
- > What is done?
- > I'm spooling my query into a file with SQL*Plus's SPOOL command.
- >
- > What is the problem?
- > 1) Trailing blanks
- >
- > SQL*Plus uses LINESIZE setting and puts trailing blanks in the
- > end of each line it spools. I need to remove all these blanks!
- >
- > Can this be done by SQL*Plus?
- > What unix commands could be used to do this? I'm novice with unix.
- >
- In UNIX, you can type :
-
- sed -e 's/ *$//g' myfile.lst > myfile.lis
-
- this says, "delete one or more blanks at the end of each line". Works
- great.
- >
- > 2) Unix to Dos convertion
- >
- > My final aim is to convert the spooled file, which in UNIX
- > format, into DOS format. That is, I need to put <CR><LF>
- > instead of <LF> in the end of each line.
- >
- > Can this be done by SQL*Plus?
- > What unix command could be used to do this? I'm novice with unix.
- >
- >
- Depends on how you convert it to DOS. Most modem software alows you to
- specify what to do with CR/LF when the file type is TEXT.
- >
- > This is what I get now:
- >
- > line1 line1 <LF>
- > line2 line2 line2 line2 <LF>
- > line3 line3 line3 <LF>
- >
- > This is what I want to have:
- >
- > line1 line1<CR><LF>
- > line2 line2 line2 line2<CR><LF>
- > line3 line3 line3<CR><LF>
- >
- > Any help is appreciated!
- >
- > -Mikko Kuismin
- >
- --
- ================================================================================
- Scott Stephens inet: sstephen.us.oracle.com
- Oracle WorldWide Support Redwood City, California
-