I don't want to use dos2unix tool. I want to use command in Ubuntu terminal to convert Windows file to Unix file. Is that possible. I have looked through other articles and tried those commands but none working. Anyone can help?
相关问题
- Is shmid returned by shmget() unique across proces
- $ENV{$variable} in perl
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
You can use
tr
to remove carriage returns like this:You can use
to see if there are carriage returns in your file and they'll show up as
^M
For Ubuntu(and Debian) you can use the tofrodos package.
OSX (being a derivative of UNIX) should have the same line-endings as UNIX.
If you're on Windows, you can find tofrodos binaries here.
If you're on a Mac, you can use the brew package manager and install the tofrodos on OSX.