From owner-freebsd-questions@FreeBSD.ORG Mon Jul 11 19:07:14 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8104C16A41C for ; Mon, 11 Jul 2005 19:07:14 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail23.sea5.speakeasy.net (mail23.sea5.speakeasy.net [69.17.117.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D82543D48 for ; Mon, 11 Jul 2005 19:07:13 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 6204 invoked from network); 11 Jul 2005 19:07:13 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail23.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 11 Jul 2005 19:07:13 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 922FC30; Mon, 11 Jul 2005 15:07:12 -0400 (EDT) Sender: lowell@be-well.ilk.org To: Brian Henning References: <1f75ab0e050711113657ba7057@mail.gmail.com> From: Lowell Gilbert Date: 11 Jul 2005 15:07:12 -0400 In-Reply-To: <1f75ab0e050711113657ba7057@mail.gmail.com> Message-ID: <44irzhp3fj.fsf@be-well.ilk.org> Lines: 13 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: OT: Shell script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2005 19:07:14 -0000 Brian Henning writes: > I am trying to write an SH script that i need some functionality. > > I want it to be able to get a filename without the extention on the end. > > for example. > > file.mp3 > > i would like it to return 'file'. basename(1); it's even POSIX, so it's pretty portable.