tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: svn commit: r1002263 - /tomcat/trunk/bin/catalina.sh
Date Wed, 29 Sep 2010 10:10:31 GMT
On 09/29/2010 10:51 AM, Rainer Jung wrote:
> 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').'
>

Or since this is a file name variable:
echo "Tomcat stopped but PID file could not be removed \`$CATALINA_PID'."

The notion `file.name' is a usual way of reporting the paths.
Most of the coreutils behave like that.

>
> 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.

Think one of the Solaris shells behaves weird in those cases.
Anyhow, since braces are usually used for subshell section, a good
practice would be to avoid them entirely.



Regards
-- 
^TM

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


Mime
View raw message