Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: UNIX sqlplus can't echo multiline commands in order

Re: UNIX sqlplus can't echo multiline commands in order

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 4 Oct 2006 15:31:14 -0700
Message-ID: <45243632$1@news.victoria.tc.ca>


yong321_at_yahoo.com wrote:
: Malcolm Dew-Jones wrote:
: > yong321_at_yahoo.com wrote:
: > : I''m sure everyone has seen this. If I copy
: >
: > : select * from dual;
: > : select * from dual;
: > : select * from dual;
: > : select * from dual;
: >
: > : from my Windows clipboard and paste them all into sqlplus running on
: > : UNIX or Linux, the screen looks like this:
: >
: > : SQL> select * from dual;
: > : select * from dual;
: > : select * from dual;
: > : select * from dual;
: >
: > : D
: > : -
: > : X
: >
: > : SQL>
: > : D
: > : -
: > : X
: >
: > : SQL>
: > : D

(...)
: >
: > : If I do this to DOS sqlplus, I don't have this problem.
: >
: > What exactly is the problem? It looks like typical unix output to me.
: > You pasted in four commands and sqlplus ran four commands.

: Sorry I didn't explain it clearly. What I want to see is one command
: sent, then one result shown on screen, then the next command and then
: the result, like this:

The unix terminal interface doesn't work that way. Basically it is the operating system that echoes all the lines you input, and basically that happens before they are sent to the application. Sql prompts for a line, then reads the line - which is already wating in memory and which has already been echoed earlier by the operating system - and then runs the command.

The operating system does not wait the application to prompt for the next line. That is why and how pipelines work, a typical example

        $ generate-some-commands | sqlplus | grep whatever

The first command can generate any number of commands, it does not wait for sqlplus to be ready before creating each line.

Windows doesn't have regular pipe lines, and the interface must do various gludgey things in the background to make it all work.

sqlplus has a "-s" option, for "silent", which may help control your display. Received on Wed Oct 04 2006 - 17:31:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US