I have a Query(Oracle) in Bash like that
RETVAL=`sqlplus -S /nolog <<EOF
connect $ORCL_USR/$ORCL_PWD@$ORCL_TNS;
SET PAGESIZE 0 FEEDBACK OFF VERIFY OFF HEADING OFF ECHO OFF
select trim(Colm1) from $MyTable
EXIT;
EOF`
Result="Result.txt"
touch $Result
echo "$RETVAL" >> "$Result"
cat $Result
If i just select a column then the result is correct , every column( i just have a column) have a line so.
cat Result.txt
111
222
333
The problem is when i try to query 2 columns or more so in Revalt i put:
select trim(Colm1),trim(column2) from $MyTable
when i do the Cat $Result.txt the result is:
111
Car
222
Hause
333
Dog
when i would wish
111 Car
222 Hause
333 Dog
So every row in a line for the File.
How can achieve it?
Thanks in Advance , Enrique