help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] basename for n levels


From: Stephane Chazelas
Subject: Re: [Help-bash] basename for n levels
Date: Wed, 10 Jun 2015 15:14:11 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

2015-06-10 08:33:07 -0500, Peng Yu:
> For example:
> 
> If the input string is a////b///c///d//e, and n=3, the output should be c/d/e.
> 
> If n=4, the output should be b/c/d/e.
> If n>=5, the output should be a/b/c/d/e.
[...]

What about for input strings like:

/a/./b/./c
/a/b/../c
//host/file
//?/UNC/server

?

-- 
Stephane




reply via email to

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