gpt4 book ai didi

linux - 将新行字符更改为 Linux 格式

转载 作者:太空狗 更新时间:2023-10-29 11:39:27 25 4
gpt4 key购买 nike

我已经从 Linux 上的 svn 下载了一些软件的源代码并想要构建它:

$ ./configure
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory

字符 ^M 是一个\r 回车符。当我将文件的行尾更改为 Linux 格式时,它就开始工作了,但是这些文件很多,手动很难做到。如何将目录及其子目录下所有文件的行尾改为Linux格式?

最佳答案

使dos2unix转换目录中的每个文件。

find . -type f -exec dos2unix {} \;

关于linux - 将新行字符更改为 Linux 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8342421/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com