set echo off command issue


 
Thread Tools Search this Thread
Operating Systems Linux set echo off command issue
# 8  
Old 03-13-2010
Here's a test just using echo off.
Code:
$ cat echo_off.sql
spool echo_test.lst

set echo on

select 'ECHO IS ON' from dual;

set echo off

select 'ECHO IS OFF' from dual;

exit

spool off

Code:
#!/bin/ksh

sqlplus user/pwd@mydb @echo_off.sql

exit

Code:
cat echo_test.lst
SQL> 
SQL> select 'ECHO IS ON' from dual;

'ECHOISON'                                                                      
----------                                                                      
ECHO IS ON                                                                      

SQL> 
SQL> set echo off

'ECHOISOFF'                                                                     
-----------                                                                     
ECHO IS OFF

It works for me. Are you sure you aren't running some sort of login trigger that keeps turning it on?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to echo command successful if command is executed successfully

Hello, I have written a command n shell script : srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f If the above command executes successfully without error I need to echo "Service relocated successfully and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies

2. Shell Programming and Scripting

Issue while using echo command

Hi, I have below shell script.. $ cat /tmp/1.txt NAME-HOST-APPLIED TIME-DATE $ cat /tmp/1.sh #!/bin/ksh echo "<html><table border size=1>" > /tmp/mail.html for i in `cat /tmp/1.txt` do a1=`echo $i |cut -d "-" -f1` a2=`echo $i |cut -d "-" -f2` a3=`echo $i |cut -d "-" -f3` a4=`echo $i... (4 Replies)
Discussion started by: thomasraj87
4 Replies

3. UNIX for Dummies Questions & Answers

set echo off and on

Hi I have written a bash script to capture the output of jmap. The command i execute is jmap -heap <pid> This gives details of memory usage of the process with <pid>. Now jmap not only gives this info but also prints couple more lines, which i am not interested in. Here are the lines that I... (3 Replies)
Discussion started by: avinthm
3 Replies

4. Shell Programming and Scripting

Issue in echo

Hi Friends, I am trying a very simple thing to print through bash shell scripting using echo but failing. My script is- A=Abha B=Biha C=2011 D=5 echo " The name is $A_$B$C0$D" It should print- "The name is Abha_Biha201105" but it's printing something else. Is my script wrong?... (2 Replies)
Discussion started by: NARESH1302
2 Replies

5. HP-UX

What is the use of command set -- and set - variable?

Hi, I am using hp unix i want to know the use of the following commands set -- set - variable thanks (4 Replies)
Discussion started by: gomathi
4 Replies

6. Shell Programming and Scripting

why the set rr='echo string|cut not working

I am new to the c shell script, can you let me know why the set rr= is not working. C shell script #! /bin/csh Set tt= 12345_UMR_BH452_3_2.txt set rr='echo $tt | cut –d”_” -f1' syntax error (4 Replies)
Discussion started by: jdsignature88
4 Replies

7. Shell Programming and Scripting

echo statement issue

Hi All, I am pasting my code below if # e means file exists then echo OFR_Configlist exists >> OFR_Backup_Configfiles.log else echo OFR_Configlist Not exists >> OFR_Backup_Configfiles.log exit fi How can i show the echo message in console also at the same time? I dont want to write... (3 Replies)
Discussion started by: subin_bala
3 Replies

8. Shell Programming and Scripting

echo just 1 line before execution/set +-x

Suppose that you want to mostly not echo commands inside your script during execution (e.g. to not bog the user down with details that they do not care about) but that there is the occaisional script line that you would like to echo before you execute it. Is there an elegant way to achieve this?... (3 Replies)
Discussion started by: fabulous2
3 Replies

9. UNIX for Dummies Questions & Answers

set variable to Home, then echo it to screen

Major Newbie here folks. I'm trying to set a variable to my Home directory and then echo it to the screen. Any and all help is greatly appreciated. Thanks Anna (3 Replies)
Discussion started by: amidget
3 Replies

10. Shell Programming and Scripting

How to set echo on

I'm looking at my bash man page and I'm expecting to find some option that I can use to make it echo every command that it executes. The description of --verbose was pretty terse! Is --verbose supposed to make it echo every command it executes? My bash script script (named ws2) contains a... (1 Reply)
Discussion started by: siegfried
1 Replies
Login or Register to Ask a Question
PG_SEND_QUERY(3)														  PG_SEND_QUERY(3)

pg_send_query - Sends asynchronous query

SYNOPSIS
bool pg_send_query (resource $connection, string $query) DESCRIPTION
pg_send_query(3) sends a query or queries asynchronously to the $connection. Unlike pg_query(3), it can send multiple queries at once to PostgreSQL and get the results one by one using pg_get_result(3). Script execution is not blocked while the queries are executing. Use pg_connection_busy(3) to check if the connection is busy (i.e. the query is executing). Queries may be cancelled using pg_cancel_query(3). Although the user can send multiple queries at once, multiple queries cannot be sent over a busy connection. If a query is sent while the connection is busy, it waits until the last query is finished and discards all its results. PARAMETERS
o $connection - PostgreSQL database connection resource. o $query - The SQL statement or statements to be executed. Data inside the query should be properly escaped. RETURN VALUES
Returns TRUE on success or FALSE on failure. Use pg_get_result(3) to determine the query result. EXAMPLES
Example #1 pg_send_query(3) example <?php $dbconn = pg_connect("dbname=publisher") or die("Could not connect"); if (!pg_connection_busy($dbconn)) { pg_send_query($dbconn, "select * from authors; select count(*) from authors;"); } $res1 = pg_get_result($dbconn); echo "First call to pg_get_result(): $res1 "; $rows1 = pg_num_rows($res1); echo "$res1 has $rows1 records "; $res2 = pg_get_result($dbconn); echo "Second call to pg_get_result(): $res2 "; $rows2 = pg_num_rows($res2); echo "$res2 has $rows2 records "; ?> The above example will output: First call to pg_get_result(): Resource id #3 Resource id #3 has 3 records Second call to pg_get_result(): Resource id #4 Resource id #4 has 1 records SEE ALSO
pg_query(3), pg_cancel_query(3), pg_get_result(3), pg_connection_busy(3). PHP Documentation Group PG_SEND_QUERY(3)