On Dec 15, 2000, Assar Westerlund <[EMAIL PROTECTED]> wrote:

> You don't happen to have one for basename too? :-)

Basename is far simpler:

% echo "$pathname" | sed 's,.*/,,'

For extra credit, you may want to cover DOS pathnames too, but I'll
leave that as an exercise for the reader :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Reply via email to