Linux:如何在别名内添加$符号?
作者:互联网
好吧,我用’csh’shell.我有一个’sed’cmd,如下所示,它将String1中的数据grep到下一个emptyNewLine.
sed -n '/startString/,/^$/p' myLog.log ==> works fine
但是,当我在“别名”中使用上述sed cmd时,出现了以下错误.
<48 sne-70 [sunil_c85see] :/home1/sunil_c85see>alias check "sed -n '/startString/,/^$/p' myLog.log"
**Illegal variable name.**
任何建议如何解决这个问题.
解决方法:
alias check "sed -n '/startString/,/^"\$"/p' myLog.log"
标签:csh,shell,sed,alias,linux 来源: https://codeday.me/bug/20191119/2036457.html