bash reading file wrong 1

bash reading file wrong

#Possible solution
sed -i 's/\r//g' script.sh
#Just execute command above to fix problem replacing script name for yours 😉

Here is what the above code is Doing:
1. The -i option tells sed to edit the file in place.
2. The ” is the empty string, which is the replacement string.
3. The s/\r//g is the substitution command. The s means “substitute”, the \r is the carriage return character, and the //g means “replace all occurrences on the line”.

Similar Posts