在使用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