On 28.09.2010 19:41, Mladen Turk wrote:
Next the code
 > echo "Tomact stopped but PID file could not be removed ($CATALINA_PID)."

Will fail on shells that handle ( ...) like ` ... `

Just as an info: you can use

echo 'Tomcat stopped but PID file could not be removed ('$CATALINA_PID').'

(one line).

Inside single quotation marks shells do not make any substitution. Since the variable needs a substitution you can switch from the single quotation marks to double ones or none at all on the same line (and back).

I'm not sure though, which shells really handle "(..)" or "[...]" inside a string as above in a special way. I would expect most bigger shell scripts to fail then exactly because this is so common in log outputs. So in my opinion the above was already safe. I only know about the $((...)) idiom in ksh.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to