[lug] simple script

Ken Weinert kenw at ihs.com
Tue Oct 9 08:27:41 MDT 2001


* rotering at animalcules.com (rotering at animalcules.com) [011009 04:24]:
> On Mon, Oct 08, 2001 at 09:55:54PM -0400, Taz wrote:
> 
> > Forgive the ignorance, but is the word "basename" a keyword or filename
> > delimiter?
> 
> It's a command that strips the directory and (optionally) suffix from
> a filename.
> 
> I think Ken Weinert's solution is the much more elegant, though.

	Thanks, but one note: this is something that will only (as far
as I know) work in bash or ksh. The basename approach is something to
keep in mind if you have to do something similiar in another shell.

	I too prefer ther $( ) syntax, but that is specifically bash
(and perhaps ksh.)  The other advantage to $( ) is that they nest.

-- 
Ken Weinert   kenw at ihs.com 303-858-6956 (V) 303-705-4258 (F)
GnuPG KeyID: 9274F1CE           GnuPG available at http://www.gnupg.org/
GnuPG Key Fingerprint: 1D87 3720 BB77 4489 A928  79D6 F8EC DD76 9274 F1CE
Don't use a big word where a diminutive one will suffice.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20011009/ac525f64/attachment.pgp>


More information about the LUG mailing list