Google colaboratory /bin/bash:找不到命令Google Colab

Google colaboratory /bin/bash:找不到命令Google Colab,google-colaboratory,Google Colaboratory,我正试图在Google Colab上运行一个现成的项目。。运行shell时,会出现以下错误: /bin/bash: example.sh: command not found 如何解决此问题?在谷歌colab中运行shell脚本有两个选项: 1) 使用执行单个脚本: !sh example.sh !echo "I am your code !!!" 2) 使用%%shell将整个代码块作为shell脚本执行: %%shell sh example.sh echo "You should a

我正试图在Google Colab上运行一个现成的项目。。运行shell时,会出现以下错误:

/bin/bash: example.sh: command not found

如何解决此问题?

谷歌colab
中运行shell脚本有两个选项:

1) 使用
执行单个脚本

!sh example.sh
!echo "I am your code !!!" 
2) 使用
%%shell将整个代码块作为shell脚本执行:

%%shell
sh example.sh
echo "You should add %% "

注意:在第二种方法中,整个块被解释为shell脚本。您不需要
在每个脚本的开头。

@noor我的荣幸:)请您指出一个资源,我可以从中学习在google colab中使用这些shell命令的方法!另外,由于
vi
命令不起作用,您如何看待单元格中文件的内容?@Amir我面临类似的问题<代码>!使安装!gedit config.json
并且我得到一个
/bin/bash:gedit:command未找到