Re: [Nagios-devel] Re: Bug: NSCA 2.4 on OS X 10.3

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Re: Bug: NSCA 2.4 on OS X 10.3

Post by Guest »

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





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked