摘要:
一个诡异的bash问题今天写的一个bash脚本运行发现:test.sh: 1: #!/bin/bash: not found本以为是由于在windows下编辑导致的问题,执行dos2unix之后问题依旧。后来想到用file命令查看,文件居然是UTF-8 Unicode (with BOM) text格式# file test.sh test.sh: UTF-8 Unicode (with BOM) text而正常的bash脚本格式应该为 Bourne-Again shell script text executable用vim -b test.sh删除开头的<feff>即可。 阅读全文
posted @ 2012-04-24 14:44 feisky 阅读(570) 评论(0) 推荐(0)
浙公网安备 33010602011771号