bash output redirection
I would like to output an echo to the same line as the results of a db2 query instead of both being printed on separate lines. Here is an example if I am not clear.
Code:
if [ "$_input" != "$_temp" ]; then
echo "$_input, " >> $_dataFile
fi
db2 -x "select statement" | sed 's/ */,/g' >> $_dataFile
Right now it outputs
Code:
$_input
results,from,db2
I would like
Code:
$_input,results,from,db2
TIA.
Asus
Intel Core 2 Duo 2.26 GHz - 4GB DDR2
1 GB ATI Mobility Radeon HD 3650
Atheros AR928X Wireless
Bookmarks