help-bash
[Top][All Lists]
Advanced

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

[Help-bash] pattern replacement experiment


From: Bill Gradwohl
Subject: [Help-bash] pattern replacement experiment
Date: Wed, 21 Mar 2012 12:55:05 -0600

answer='012345'
modifier='?/.'
echo $answer ${answer//?/.} ${answer//${modifier}}

address@hidden ycc# ./tst
012345 ...... 012345

I expected either for it to work or give me 'bad substitution'.

I didn't expect what I got.

Is it because ${modifier} is considered the pattern only , and not the pattern plus the string?


--
Bill Gradwohl


reply via email to

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