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 some characters to it, it always comes to the start of the line.
test.dat
(which has carriage return at end):
testVar=value123
testScript.sh
(sources above file):
source test.dat
echo $testVar got it
The output I get is
got it23
How can I remove the '
'
from the variable?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…