我有这个代码:
# Generate bash script
$bashScript = "#!/bin/bash`n";
$bashScript += [string]::Join("`n", $cmds)
[System.IO.File]::WriteAllLines($location.ToString() + ".\build.sh", $bashScript);
问题是我总是CRLF
在文件末尾得到字符!
#!/bin/bash [LF]
tsc ... [LF]
java ... [LF]
java ... [CR][LF]
除了最后更换,我能做些什么CRLF
吗?