I am new to shell script. I am sourcing a file, which is created in Windows and has carriage returns, using the source command. After I source when I append som
source
You can use sed as follows:
MY_NEW_VAR=$(echo $testVar | sed -e 's/\r//g') echo ${MY_NEW_VAR} got it
By the way, try to do a dos2unix on your data file.
dos2unix