在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中回应并且无法更改.