echo“ok”和echo $“ok”之间有什么区别?

时间:2016-05-25 03:31:33

标签: bash

当我在/etc/init.d中阅读脚本时,我注意到他们以这种方式使用了echo

echo $"$prog not running"

而不是:

echo "$prog not running"

谁能告诉我有什么区别?

etc/init.d/autofs:    echo $"$prog not running"
/etc/init.d/autofs:   echo $"Reloading maps"
/etc/init.d/autofs:   echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart}"
/etc/init.d/avahi-daemon: echo $"Usage: $0 {start|stop|status|restart|condrestart}"
/etc/init.d/bluetooth:  echo $"Usage: $0 {start|stop}"
/etc/init.d/cgred:      echo $"Reloading rules configuration..."
/etc/init.d/cgred:    echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
/etc/init.d/cpuspeed:    echo $2 > $cpu/cpufreq/$1
/etc/init.d/cpuspeed:    echo $"Usage: $0 {start|stop|restart|condrestart|status}"
/etc/init.d/crond:        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
/etc/init.d/cups: echo $"Usage: $prog {start|stop|restart|restartlog|condrestart|try-restart|reload|force-reload|status}" 
/etc/init.d/ebtables: echo $"Usage $0 {start|stop|restart|condrestart|save|status}"
/etc/init.d/firstboot:    echo $"Usage: $0 {start|stop}"

0 个答案:

没有答案