Hi,
I have created a function to do a database call:
function calldb
{
OUTPUT=`some DB command`
echo "OUTPUT =$OUTPUT"
}
But if I use the function the output is one line:
Output = -------- IQ_SYSTEM_MAIN MAIN T T 21 1000M 0B 1 1 T 1K 1H,25568F,32D,128M N IQ_SYSTEM_TEMP TEMPORARY T T 1 250M 0B 1 1 T 1K 1H,64F,32A N user_main MAIN T T 1 1000M 0B 1 1 T 1K 1H,24A N (3 rows affected) (return status = 0)
All newlines have been stripped from the output.
If I place the same call in the main part of the script the output looks fine. So including all the newlines.
Any idea what I have to do in order for the output to show the output as multiple lines?
I need the lines for further processing.
Thanks
I have created a function to do a database call:
function calldb
{
OUTPUT=`some DB command`
echo "OUTPUT =$OUTPUT"
}
But if I use the function the output is one line:
Output = -------- IQ_SYSTEM_MAIN MAIN T T 21 1000M 0B 1 1 T 1K 1H,25568F,32D,128M N IQ_SYSTEM_TEMP TEMPORARY T T 1 250M 0B 1 1 T 1K 1H,64F,32A N user_main MAIN T T 1 1000M 0B 1 1 T 1K 1H,24A N (3 rows affected) (return status = 0)
All newlines have been stripped from the output.
If I place the same call in the main part of the script the output looks fine. So including all the newlines.
Any idea what I have to do in order for the output to show the output as multiple lines?
I need the lines for further processing.
Thanks