更新时间:2023-01-21 19:37:08
您可以使用 $(!!)
重新计算(不是重复使用)最后一个命令的输出.
You can use $(!!)
to recompute (not re-use) the output of the last command.
!!
自己执行最后一个命令.
The !!
on its own executes the last command.
$ echo pierre
pierre
$ echo my name is $(!!)
echo my name is $(echo pierre)
my name is pierre