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
for a pure shell solution without calling external program:
NL=$'\n' # define a variable to reference 'newline' testVar=${testVar%$NL} # removes trailing 'NL' from string