bug-coreutils
[Top][All Lists]
Advanced

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

Re: basename sucks


From: Mike Frysinger
Subject: Re: basename sucks
Date: Thu, 1 Feb 2007 16:53:05 -0500
User-agent: KMail/1.9.6

On Thursday 01 February 2007, Alfred M. Szmidt wrote:
> dirname -- sed 's;[^/]*$;;'
> basename -- sed 's;.*/;;'

and even these can be done in shell
dirname - ${foo%/*}
basename - ${foo##*/}

but you're now assuming that the path separator is always '/' ...
-mike

Attachment: pgpWOBio_EYcf.pgp
Description: PGP signature


reply via email to

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