I’m trying to replace all carriage returns with a comma in a text file but I must be using the sed
command improperly.
Since I can echo -e "\x0D"
and yield the carriage return I tried sed -e 's/open/'$(echo "\x0D")'/' 1.txt > 2.txt
to no avail. 1.txt
contains the carriage return, as you may have inferred. That command creates 2.txt
which contains text x0D
.