I using shell script to replace a number in the text file . Content of file is:
cat file
7.0.78 | 8.0 | 7.0.47
And I am using below command . This is working from command prompt but not from script.
Actual=8.0.44.0
sed -i -e "s/8.0/$Actual/g" file
I am getting output as | 7.0.478.0.44.0
from debug mode , I noticed that my variable become as:
+ Actual=$'8.0.44.0\r'
+ echo $'8.0.44.0\r'
Please advise, how to fix this issue. Thanks