Context: I'm trying to spruce up the jboss_init_redhat.sh file that comes with a jboss installation, so that it provides the same [ OK ] / [ FAILED ] flags that most of the other /etc/init.d/ scripts have. The file is jboss's auto start/stop for RH.
(I don't have to, but it's a good way to stretch my scripting knowledge...)
I'm using /etc/init.d/sshd as my model, and I've encountered this echo line:
echo -n $"Starting $prog: "
I get the -n. I get the $prog variable for expansion. I even get providing the space at the end of the string.
What in the world is that dollar sign supposed to be doing? Turning the whole string into a variable?!