【发布时间】:2011-03-07 20:06:06
【问题描述】:
这是一个文件的内容:
one two three
four five six
这是我的别名
alias testawk "awk '{print $2}' file"
这是我得到的:
> testawk
one two three
four five six
但是当我给出这个命令时,我得到了我想要的:
> awk '{print $2}' file
two
five
如何转义别名中的字段说明符?注意:我正在使用 csh
【问题讨论】:
-
这里解释一下处理csh meta-chars grymoire.com/Unix/Csh.html#uh-7
-
\$在 bash 中工作,但 csh 有点挑剔。