Re: removing slash at end of dir spec (if it exists)



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.

.