我正在尝试在Google Colab上运行一个就绪项目。.当我运行外壳程序时,它出现以下错误:
/bin/bash: example.sh: command not found
我该如何解决这个问题?
您可以通过以下两种方式运行Shell脚本google-colab
:
1)使用以下命令执行一个脚本!
:
!sh example.sh
!echo "I am your code !!!"
2)使用%%shell
以下命令作为shell脚本执行整个代码块:
%%shell
sh example.sh
echo "You should add %% "
注意:在第二种方法中,将整个块解释为shell脚本。您不需要!
在每个脚本的开头。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句