[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: basename sucks
From: |
Evan Hunt |
Subject: |
Re: basename sucks |
Date: |
Thu, 1 Feb 2007 12:17:29 -0800 |
User-agent: |
Mutt/1.5.10i |
> 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
- basename sucks, dusan halicky, 2007/02/01
- Re: basename sucks, Eric Blake, 2007/02/01
- Re: basename sucks, Alfred M. Szmidt, 2007/02/01
- Re: basename sucks, Eric Blake, 2007/02/01
- Re: basename sucks, Alfred M. Szmidt, 2007/02/01
- Re: basename sucks,
Evan Hunt <=
- Re: basename sucks, Matthew Woehlke, 2007/02/01
- Re: basename sucks, Alfred M. Szmidt, 2007/02/01
- Re: basename sucks, Mike Frysinger, 2007/02/01
- Re: basename sucks, Bob Proulx, 2007/02/01
- Re: basename sucks, Alfred M. Szmidt, 2007/02/02
- Re: basename sucks, Bob Proulx, 2007/02/02
- Re: basename sucks, Matthew Woehlke, 2007/02/02
- Re: basename sucks, Mike Frysinger, 2007/02/02
- Re: basename sucks, Matthew Woehlke, 2007/02/02
- Re: basename sucks, Andreas Schwab, 2007/02/02