linux - Any command we can use to convert windows file to unix or mac file? -


I do not want to use the dos2unix tool. I want to use the command in the Ubuntu terminal so that the windows can be converted to a UNIX file. Is it possible. I looked through other articles and tried those commands, but nobody is working, anybody can help

You can use tr to remove the carriage return in this way:

  tr -d '\ r' & lt; Windows File & gt; UnixFile   

You can see the carousis return in your file by using

  cat -vet WindowsFile   

And they will appear as ^ M

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -