[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Best way to remove trailing '/' from a path?
From: |
Eric Blake |
Subject: |
Re: [Help-bash] Best way to remove trailing '/' from a path? |
Date: |
Mon, 20 Apr 2015 15:05:46 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 04/20/2015 03:00 PM, Chris F.A. Johnson wrote:
>> dirname -- "$VAR/."
>
> $ var=q/////////
> $ dirname -- "$VAR/."
> /
Umm, $var and $VAR are different entities. dirname -- "$var/." results
in the desired "q".
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Help-bash] Best way to remove trailing '/' from a path?, (continued)
Re: [Help-bash] Best way to remove trailing '/' from a path?, Stephane Chazelas, 2015/04/20
Re: [Help-bash] Best way to remove trailing '/' from a path?, Stephane Chazelas, 2015/04/20
Re: [Help-bash] Best way to remove trailing '/' from a path?, Chris F.A. Johnson, 2015/04/20
- Re: [Help-bash] Best way to remove trailing '/' from a path?,
Eric Blake <=
Re: [Help-bash] Best way to remove trailing '/' from a path?, Eric Blake, 2015/04/21