Re: removing slash at end of dir spec (if it exists)
- From: Hai Vu <haivu2004@xxxxxxxxx>
- Date: Wed, 3 Dec 2008 00:03:59 -0800 (PST)
try basename:
basename /Users/hai/bin/ /
will returns /Users/hai/bin
On Dec 1, 3:29 am, laoming...@xxxxxxxxx wrote:
I have some directory specs that are causing a partial failure when
encountered
in my script. How can I remove the last slash of such a directory
specification?
Thanks.
.
- Follow-Ups:
- Re: removing slash at end of dir spec (if it exists)
- From: jellybean stonerfish
- Re: removing slash at end of dir spec (if it exists)
- From: Stephane CHAZELAS
- Re: removing slash at end of dir spec (if it exists)
- References:
- removing slash at end of dir spec (if it exists)
- From: laomingliu
- removing slash at end of dir spec (if it exists)
- Prev by Date: Re: print the whole command before an error message
- Next by Date: Re: Sudo and vi
- Previous by thread: Re: removing slash at end of dir spec (if it exists)
- Next by thread: Re: removing slash at end of dir spec (if it exists)
- Index(es):