On Sat, 2003-10-25 at 20:25, James Nickerson wrote:
> I would have thought that something would work like:
> 
> for i in src/*.cpp; do echo ${{i#src/*}/.cpp/.o}; done
> 
> but that doesn't, and neither does anything else I tried.  The docs are silent 
> on the subject of multiple expansional operations.

You're going to have to do it in two step.

i="${i#src/*}"
echo ${i/.cpp/.o}

The ${} is acting on variables, not strings, that's why you want do it
one step. In effect, what you've been doing is
${${NON-EXISTENT-VARIABLE}/.cpp/.o}

-- 
Stuart Jansen <[EMAIL PROTECTED], AIM:StuartMJansen>

Programming in Java feels like C without the sense of accomplishment.

Attachment: signature.asc
Description: This is a digitally signed message part

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to