在使用shell
脚本运行python
程序时,遇到了一个问题:
No such file or directorython: can't open file
, 但是文件实际上是存在的,出现这个错误是由于windows
上编写的
shell文件格式在unix上会出现解析错误,执行的时候需要修改一下格式。
使用vim
打开要执行的shell
文件
esc : set ff # 查看文件当前的格式
esc : set ff=unix # 修改格式为unix
在使用shell
脚本运行python
程序时,遇到了一个问题:
No such file or directorython: can't open file
, 但是文件实际上是存在的,出现这个错误是由于windows
上编写的
shell文件格式在unix上会出现解析错误,执行的时候需要修改一下格式。
使用vim
打开要执行的shell
文件
esc : set ff # 查看文件当前的格式
esc : set ff=unix # 修改格式为unix