ogb*_*jnr 1 bash shell ubuntu gnome-terminal
到目前为止我有这个有效的命令
\n\ngnome-terminal --tab -e \'/bin/bash -c "ls";bash\'\nRun Code Online (Sandbox Code Playgroud)\n\n但有一个警告
\n\n# Option \xe2\x80\x9c-e\xe2\x80\x9d is deprecated and might be removed in a later version of gnome-terminal.\n# Use \xe2\x80\x9c-- \xe2\x80\x9d to terminate the options and put the command line to execute after it.\nRun Code Online (Sandbox Code Playgroud)\n\n当我将其更改为
\n\ngnome-terminal --tab -- \'/bin/bash -c "ls";bash\'\nRun Code Online (Sandbox Code Playgroud)\n\n新选项卡失败并显示
\n\nThere was an error creating the child process for this terminal\nFailed to execute child process \xe2\x80\x9c/bin/bash -c "ls";bash\xe2\x80\x9d (No such file or directory)\nRun Code Online (Sandbox Code Playgroud)\n
原因在于:
gnome-terminal --tab -- '/bin/bash -c "ls";bash'
Run Code Online (Sandbox Code Playgroud)
失败的是它正在寻找一个以此为名称的程序。这是链式加载的一个实例,其中其余参数按原样传递给 exec。第一个参数是程序的名称。通过此引用,它接收整个命令和选项作为单个程序名称。
将引用更改为:
gnome-terminal --tab -- /bin/bash -c "ls;bash"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4245 次 |
| 最近记录: |