我尝试在 unix 机器上使用 dos2unix 命令,但它给了我这样的错误 --
data_load]$ dos2unix a.csv a.csv
-bash: dos2unix: command not found
然后我用 ---
data_load]$ yum search dos2unix
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
=================================================== N/S Matched: dos2unix ===================================================
dos2unix.x86_64 : Text file format converter
有什么方法可以使用它,但我无法以 ROOT 身份登录
最佳答案
您可以要求系统管理员安装dos2unix
。显然他还没有安装它。
您可以从 source code 编译它。如果它有一个 configure
脚本(来自 autoconf ),您可以将 --prefix=$HOME/soft
参数传递给该脚本,然后将 $HOME/soft/bin/
添加到您的 $PATH
中。 .
也许使用 tr(1)也许就足够了...
关于linux - 无法在 UNIX 机器上使用 dos2unix,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32602271/