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: pgpZjNoDvvO2J.pgp
Description: PGP signature

_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to