"\r" is
carriage return and may have arisen from creating the script using a Windows text editor. In Windows each line ends with "carriage return" and
newline. In Linux each line ends with newline alone so any preceding carriage return is taken as part of the line.
The
fromdos command can be used to convert Windows/DOS format files.
For a quick-and-dirty solution you can comment out the end of line
Code:
cp -r /mnt/datasource/* /opt/IBM/WebSphere/DataSource/ # comment to hide end of line garbage