Angus Leeming <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
>
>> Angus Leeming <[EMAIL PROTECTED]> writes:
>> 
>> | Lars Gullik Bjønnes wrote:
>>>> | In your other mail you say
>>>> |  I am not sure that the brace expansion stuff
>>>> |  is really portable. (I am sure angus can help me
>>>> |  with that :-) )
>>>>>
>>>> | What are you talking about? I see no braces...
>>>> 
>>>> One line below...:
>>>> 
>>>> $${TMPCMD/$$PATTERN}
>>>> 
>>>> I am not sure this is portable among the shells we should work with.
>>>
>> | I've never seen it before and I can't find it described at
>>>
>> |  http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html
>> |  Shell Command Language
>>>
>> | Having said that, I couldn't find it in a quick `man bash` either...
>>>
>> | What does it mean?
>> 
>> "delete pattern from tmpcmd"
>> 
>> basically the same as
>> 
>> cat $TMPCMD | sed -e "s/$PATTERN//"
>> 
>> but I had problems getting that to work.
>> (but I might have more luck now, the main problems was using automake
>> variables directly. (they are expanded too early)
>
| I was confused by '$$'. I forgot that make would make that visible to the
| shell as '$'.
>
| ${FOO${BAR}} is a perfectly acceptable shell-ism IMO. Expand ${BAR} to bar
| and then expand ${FOObar}. Seems fine to me.
>
| Let's try it.
| [EMAIL PROTECTED]:aleem-> BAR=bar
| [EMAIL PROTECTED]:aleem-> FOObar=wooo
| [EMAIL PROTECTED]:aleem-> echo ${FOO${BAR}}
| ksh: ${FOO${BAR}}: bad substitution
| [EMAIL PROTECTED]:aleem-> sh
| [EMAIL PROTECTED]:aleem-> BAR=bar
| [EMAIL PROTECTED]:aleem-> FOObar=woooo
| [EMAIL PROTECTED]:aleem-> echo ${FOO${BAR}}
| bad substitution
>
| Sorry. You're out of look. Not portable to Tru64 unix.

but you are not testing the brace stuff that I use...

notice the '/'

but I just tested with ksh here and it still fails.

So er need to figure out how to make sed do what we want.

-- 
        Lgb

Reply via email to