bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No tilde expansion right after a quotation


From: Angel Tsankov
Subject: Re: No tilde expansion right after a quotation
Date: Mon, 16 Feb 2009 00:54:46 +0200

Jon Seymour wrote:
> On Mon, Feb 16, 2009 at 9:26 AM, Angel Tsankov
> <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]