Why is the $ sign used in this bash script

I look at the Fedora sysV init script example and it looks something like this:

#...some code start() { [ -x $exec ] || exit 5 [ -f $config ] || exit 6 echo -n $"Starting $prog: " # if not running, start it up here, usually something like "daemon $exec" retval=$? echo [ $retval -eq 0 ] && touch $lockfile return $retval } #...some more code.... 

What is the reason for the first dollar sign on this line, because it seems like the script will work fine without it - right?

 echo -n $"Starting $prog: " 
+4
source share
1 answer

$"..." is an extension that allows gettext i18n to be used in bash scripts .

+6
source

All Articles