What is the simplest way to remove all the carriage returns \\r from a file in Unix?
\\r
I've used python for it, here my code;
end1='/home/.../file1.txt' end2='/home/.../file2.txt' with open(end1, "rb") as inf: with open(end2, "w") as fixed: for line in inf: line = line.replace("\n", "") line = line.replace("\r", "") fixed.write(line)