Hey everyone, I wasn't sure if this should go here or in the SQL forum or the Linux forum, but here goes:
Using Oracle10g on Linux, I'm using a bash script to run an sql script, but when I try to echo the results, it shows the output in a single line.
Here's the script
USERLIST=`sqlplus -s / AS SYSDBA <<EOF
set head off
set verify off
set feedback off
SELECT username from dba_users;
exit;
EOF
`
echo $USERLIST;
And here's the output:
oracle@apps scripts]$ ./userl.sh
PAYROLL HR2 CORE DEMO TIMEKEEPING SYS EXPENSE
Is there anyway so that the output can be shown with line breaks, where all the output is not on one line? I understand I can spool to a file using the spool command, however I'd like to try and get it working this way first.
Any help would be much appreciated, thanks.
Edited by: oscrub on Sep 22, 2010 6:46 PM