|
发表于 2004-12-1 08:48:44
|
显示全部楼层
回复: echo $"abc" 和echo "abc"的区别
最初由 biz 发表
在rh的/etc/rc.sysinit里面很常见的现象,就是在字符串前面加了$符号,e.g:
echo -en $"\t\tWelcome to "
action $"Configuring kernel parameters: " sysctl -e -p /etc/sysctl.conf
等等
why?
请看Bash的man手册的解释。
A double-quoted string preceded by a dollar sign ($) will cause the
string to be translated according to the current locale. If the cur-
rent locale is C or POSIX, the dollar sign is ignored. If the string
is translated and replaced, the replacement is double-quoted. |
|