windows下生成的脚本,linux无法正常运行
go
// golang
dstFile := "a.bash"
newData := `
#!/bin/bash
echo "111"
echo "222"
`
os.WriteFile(dstFile, []byte(newData), 0777)
exec.Command("sed", "-i", "'s/\r//'", dstFile).Run()