I have a variable whose value is found using sql query.I want to remove the new line charcater from that variable since I want to concatenate this variable with the other. Below is the code:dt=`sqlplus -s user/pwd@servicename <<EOFset feedback off;set head off;select  replace(to_char((sysdate-7),'YYYYMonDD')||'_'||to_char((sysdate-1),'YYYYMonDD'),chr(10), '') from dual;exit;EOF`echo test $dt
Remove newline from unix variable
sed