As described in questions, if I see a file in unix then I see special characters in it like ^M
at the end of every line but if I see same file in eclipse than I
You have saved your text file as a DOS/Windows text file. Some Unix text editors do not interpret correctly DOS/Windows newline convention by default. To convert from Windows to Unix, you can use dos2unix
, a command-line utility that does exactly that. If you do not have that available in your system, you can try with tr
, which is more standard, using the following invocation:
tr -d '\r' < input.file > output.file