回声“#!”失败-“事件未找到”以下内容失败了,我不明白为什么:$ echo "#!"使用相同的错误消息,下列操作也会失败:$ echo "\#!"错误信息:-bash: !": event not found为什么会失败?如何echo取而代之的是?
3 回答

阿波罗的战车
TA贡献1862条经验 获得超6个赞
!
csh
set +o histexpand
set +H
echo "#!$SHELL" # oops, history expansion breaks this
echo '#!'"$SHELL"
#!
SHELL
printf '#!%s\n' "$SHELL"

ITMISS
TA贡献1871条经验 获得超8个赞
csh
echo #!
#
echo "#!"
#
"
!
-bash: !": event not found
!"
"
!
$ echo \# !# !$ echo fee ! fie fee ! fie
$ echo !echo
echo echo '# !'
添加回答
举报
0/150
提交
取消