> Furthermore, with a --suffix option, we could also allow multiple command > line arguments, another usage case that might prove useful: > > $ basename --suffix=.h foo.h bar.h
It's always fun until somebody puts out an eye by having a file named "--suffix=.h". Regarding the original query, why not just use awk? awk -F/ '{print $NF}' Or script it? while read filename; do base=`basename $filename` echo $base done Evan Hunt _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils