windows编写的shell脚本上传到linux注意事项

1、windows脚本需要另存为UFT-8编码

2、将文件放到linux上查看(使用less命令,其他命令可能看不到效果),第一行会多一个字符<U+FEFF>,需要去除

1)In your terminal, open the file using vim:
		vi file_name
2) Remove all BOM characters:
		:set nobomb
3) Save the file:
 		 :wq

3、wondows脚本问dos格式,需要转成unix格式

    1)vi file_name
    2) :set ff
    3) :set fileformat=unix
    4):wq

猜你喜欢

转载自blog.csdn.net/qq_34300892/article/details/88545129