嗨,我正在 Unix 中创建一个带有函数的子 shell,但是当我执行一个函数时,它完成了这个过程。我想知道如何在不退出子外壳的情况下退出函数。
root@kali:~# sudo apt-get install -f
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
root@kali:~# sudo apt-get install -f
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
root@kali:~# sudo apt-get install curl
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
root@kali:~# sudo dpkg --configure -a
Setting up man-db …Run Code Online (Sandbox Code Playgroud) 我知道这help是一个 shell 内置内部命令,用于查找内置命令,例如cd. 但它在 VirtualBox 中的 Kali Linux 终端中不起作用。它显示以下错误:
Command 'help' not found, did you mean:
command 'dhelp' from deb dhelp
command 'yelp' from deb yelp
Try: sudo apt install <deb name>
Run Code Online (Sandbox Code Playgroud) if如果您键入for ,提示就会消失ifconfig。那不应该发生。
\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x80(rootkali)-[~] \n\xe2\x94\x94\xe2\x94\x80#\n\n\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x80(rootkali)-[~] \n\xe2\x94\x94\xe2\x94\x80# if\nif> exit\nif> ifconfig\nif> iwconfig\nif> clear\nif> \nRun Code Online (Sandbox Code Playgroud)\n terminal ×5
kali-linux ×3
download ×1
function ×1
linux ×1
shell-script ×1
steam ×1
tmux ×1
ubuntu ×1