- 论坛徽章:
- 0
|
新手问 csh 中的\!*什么含义?
原帖由 "aerofox" 发表:
注意,楼上链接中所讲的!*与楼主帖中的!*有所不同。楼主帖中的!*表示命令行参数。前面加\就是为了防止csh按照楼上所给的链接解释。
其实楼主帖的这条命令中的\!*可以没有。
执行alias aliasname="cmd argx"后,ali..........
!! Entire previous line a.out arg1 arg2 arg3
!* All the arguments arg1 arg2 arg3
!$ Last argument arg3
!:# The #'th argument (from 0)
!:2 The second argument arg2
!* All the arguments = "命令行参数" , so why "\!*" in .cshrc ?
let's try to remove the escape character "\"
in .cshrc file
alias cd 'set old=$cwd; chdir \!*'
#csh
#source ~/.cshrc
#alias cd
set old=$cwd; chdir !*
-- yes, this is what we want .
in .cshrc file has a line
alias cd 'set old=$cwd; chdir !*'
#csh
#source ~/.cshrc
#alias cd
cd set old=$cwd; chdir ~/.cshrc
-- oh NO , this's not what we want . |
|