help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Getting rid of white space with % and %%


From: clark wang
Subject: Re: [Help-bash] Getting rid of white space with % and %%
Date: Tue, 22 May 2012 09:51:34 +0800

On Tue, May 22, 2012 at 5:25 AM, Eric Blake <address@hidden> wrote:
> On 05/21/2012 03:17 PM, Bill Gradwohl wrote:
>>
>> Is there any syntactically correct way to provide an * or + multiplier on
>> to this to get rid of all the white space at the end of a line?
>
> $ echo "'${string%${string##*[^[:space:]]}}'"

This is really cool. :)

>
> --
> Eric Blake   address@hidden    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>



reply via email to

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