Bug: NSCA 2.4 on OS X 10.3

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Wed Jan 28 08:45:21 CET 2004


Dear Sir,

You and others have done all the hard work in this matter,

On Tue, Jan 27, 2004 at 10:59:38PM -0800, Noah Leaman wrote:
> Yes. Look at that. It appears /bin/echo on OSX doesn't support -e ...
> 
> http://developer.apple.com/documentation/Darwin/Reference/ManPages/ 
> html/echo.1.html
> 
> So I took the -e out... but still the same problem.  BUT... now knowing  
> that the \t characters were probably getting interrupted. I changed the  
> default delimiter to ";" and BINGO:
> 

but it may be helpful for the NSCA developers to know whether you could
have replaced echo -e with printf.

OS-X is IIRC FreeBSD derived.

The FreeBSD 4.x man pages for printf include
'
STANDARDS
     The printf command is expected to be compatible with the IEEE Std
1003.2
     (``POSIX.2'') specification.
'

so since printf is POSIX compliant, if one possibly can, printf is a
better choice than echo.

printf does 'escape sequence interpolation' so 

stan> printf "\t\tIn the beginning was the W\bWO\b\OR\bRD\bD.\n\n\n"
                In the beginning was the WORD.


stan> 

works as you expect


> 
> -- 
> noah
>

Yours sincerely.

-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn




More information about the Developers mailing list