# 3是什么意思?

时间:2021-06-18 01:50:09
 curl http://beyondgrep.com/ack-2.02-single-file > ~/bin/ack && chmod 0755 !#:3

What is the meaning of !#:3, from ack installation guide?

# 3,来自ack安装指南的意思是什么?

1 个解决方案

#1


16  

In bash or zsh ! denotes a history command (not a shebang line which is #!, and has nothing to do with bash or zsh as such).

在巴什或zsh !表示一个history命令(不是shebang行,而是#!),与bash或zsh本身无关)。

!# means the entire command line typed so far, and :3 selects the third word, in this case ~/bin/ack.

!#表示到目前为止输入的整个命令行,并且:3选择第三个单词,在本例中为~/bin/ack。

So the command is equivalent to:

因此命令等价于:

 curl http://beyondgrep.com/ack-2.02-single-file > ~/bin/ack && chmod 0755 ~/bin/ack

#1


16  

In bash or zsh ! denotes a history command (not a shebang line which is #!, and has nothing to do with bash or zsh as such).

在巴什或zsh !表示一个history命令(不是shebang行,而是#!),与bash或zsh本身无关)。

!# means the entire command line typed so far, and :3 selects the third word, in this case ~/bin/ack.

!#表示到目前为止输入的整个命令行,并且:3选择第三个单词,在本例中为~/bin/ack。

So the command is equivalent to:

因此命令等价于:

 curl http://beyondgrep.com/ack-2.02-single-file > ~/bin/ack && chmod 0755 ~/bin/ack