My script automatically add '\r' and $'\r on every line. how can I remove $'\r from string?
<p>My script automatically add '\r' and $'\r on every line. </p>

<p>how can i remove $'\r from string?</p>

<pre><code>[root@a]# sh -x ./ftp.sh

+ HOST=$'0.0.00.2\r'

+ USER=$'root\r'

+ PASSWD=$'204\r

+ $'\r'
</code></pre>