Ok, I can’t figure this out from reading Perl’s documentation. I’m looking at the RHEL4 init script for Apache… What does this line of code do?
httpd=${HTTPD-/usr/sbin/httpd}
Why not just httpd=/usr/sbin/httpd? What’s up with all the extra syntax?
-Geoffrey Lee
That’s not Perl, its shell. Init scripts are usually written in shell. Specifically it means “if defined, use the HTTPD environment variable, otherwise use /usr/sbin/httpd”.
Look here for more info.