How to Make SQLPLUS Script in UNIX Shell Produce Output on Same Line
(Doc ID 778846.1)
Last updated on MARCH 03, 2025
Applies to:
SQL*Plus - Version 8.1.7.0 to 11.2.0.2 [Release 8.1.7 to 11.2]Generic UNIX
Goal
A Simple Select statement is executed from within a shell environment.
The value returned by the select query is transferred back to the shell.
However the result produced will have an empty line in it.
For example:
will produce the result as:
RESULT=
X
Result expected is:
RESULT=X
This is expected behavior and hence the value will be returned on a new line.
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |