Jon Seymour wrote:
> On Mon, Feb 16, 2009 at 9:26 AM, Angel Tsankov
> <fn42...@fmi.uni-sofia.bg> wrote:
>> Jon Seymour wrote:
>>> There may be other ways to do this, but:
>>>
>>>     CPATH="${CPATH}${CPATH:+:}$(echo ~usr1/blah/blah)"
>>>
>>> should work.
>>
>> Well, I'd like to avoid the use of external commands.
>>
>
> echo is a builtin, so if you are worried about performance costs
> associated with its execution, you shouldn't be.

In fact, I'm more concerned that in the expression:

CPATH="${CPATH}${CPATH:+:}$(echo ~usr1/blah/blah)" some-command

I have no way to check echo's exit status.  While it is probably true that 
echo will hardly ever fail, I just want to make sure my script works as I 
expect it to.  This means handling every possible error.

-Angel 





Reply via email to