`~#` 是 bash 的波浪号扩展吗?

Tim*_*Tim 4 bash bash-expansion

~#bash 的波浪号扩展吗?我在https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html 中没有找到它。我的问题来自https://unix.stackexchange.com/a/506532/674。谢谢。

$ ~#
The following connections are open:
  #0 client-session (t4 r0 i0/0 o0/0 fd 5/6 cc -1)
  #1 x11 (t4 r3 i0/0 o0/0 fd 8/8 cc -1)
Run Code Online (Sandbox Code Playgroud)

Kus*_*nda 10

不,这ssh是列出转发连接的特殊转义码。您显然是通过 SSH 连接连接到您的 shell。

bash如果您~#在命令行上键入,它本身将响应“未找到命令” :

$ ~#
bash: ~#: command not found
Run Code Online (Sandbox Code Playgroud)

请注意,要在按 后将an作为第一个字符输入~ 到 shellEnter~如果您的 shell 在 SSH 连接的另一端,则必须按两次,因为这些转义码。

可用的其它命令中列出ssh手册(这些需要被输入作为按压后的第一个字符Enter):

$ ~#
bash: ~#: command not found
Run Code Online (Sandbox Code Playgroud)