小编Gir*_*jay的帖子

Windows PowerShell中的echo"string">文件将不可打印的字符附加到该文件

在Windows PowerShell中:

echo "string" > file.txt
Run Code Online (Sandbox Code Playgroud)

在Cygwin:

$ cat file.txt
:::s t r i n g

$ dos2unix file.txt
dos2unix: Skipping binary file file.txt
Run Code Online (Sandbox Code Playgroud)

我想在文件中添加一个简单的"字符串".我该怎么做?即,当我说cat file.txt我只需要"字符串"作为输出.我在Windows PowerShell中回应并且无法更改.

powershell cygwin dos2unix

4
推荐指数
2
解决办法
7466
查看次数

标签 统计

cygwin ×1

dos2unix ×1

powershell ×1