help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Substring Replacement


From: Dennis Williamson
Subject: Re: [Help-bash] Substring Replacement
Date: Fri, 30 May 2014 11:39:46 -0500

Use sed. Forced how, btw?


On Fri, May 30, 2014 at 11:34 AM, Richard Taubo <address@hidden> wrote:

> Hi!
>
> On http://tldp.org/LDP/abs/html/string-manipulation.html I find the
> following example:
>         stringZ=abcABC123ABCabc
>         echo ${stringZ//abc/xyz}                # xyzABC123ABCxyz
>                                                         # Replaces all
> matches of 'abc' with # 'xyz'.
>
> If you are forced to run everything on one line without using variables,
> how
> could one accomplish this, e.g:
>         echo "abcABC123ABCabc" | echo ${????//abc/xyz}
>
>
> Thanks for feedback!
>
> Best regards,
> Richard Taubo
>
>
>


-- 
Visit serverfault.com to get your system administration questions answered.


reply via email to

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