help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Substring Replacement


From: Eric Blake
Subject: Re: [Help-bash] Substring Replacement
Date: Fri, 30 May 2014 12:55:47 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/30/2014 12:08 PM, Richard Taubo wrote:
> On May 30, 2014, at 6:51 PM, Greg Wooledge <address@hidden> wrote:
>> On Fri, May 30, 2014 at 06:34:47PM +0200, Richard Taubo wrote:
>>> 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}
>>
>> echo "xyzABC123ABCxyz"
>>
>> Now, what are you REALLY trying to do?
> 
> I have solution working like this (thanks to input from this list earlier):
> while IFS= read -r -d "" path; do
> echo -n "<li><ul>"

'echo -n' is non-portable, you should really get in the habit of using
printf instead.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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