From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4549 invoked from network); 9 Dec 1998 17:47:37 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 9 Dec 1998 17:47:37 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA00224; Wed, 9 Dec 1998 12:45:51 -0500 (EST) Resent-Date: Wed, 9 Dec 1998 12:45:44 -0500 (EST) Date: Wed, 9 Dec 1998 12:44:46 -0500 Message-Id: <199812091744.AA25994@ezdzit.zko.dec.com> From: Paul Lew To: Jason Price Cc: zsh-users@math.gatech.edu Subject: Re: Notes on bash(1) In-Reply-To: <199812091619.LAA15213@gypsy.cad.gatech.edu> References: <199812091619.LAA15213@gypsy.cad.gatech.edu> X-Mailer: VM 6.37 under Emacs 20.2.1 Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Resent-Message-ID: <"Itfwt1.0.r2.7ThRs"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1976 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >>>>> "Jason" == Jason Price writes: Jason> there are a heck of a lot of ${...} modifiers that are Jason> wonderfully useful, but in my searching through the man Jason> pages, I havn't found an equivelent to basename Jason> /usr/local/bin/mumble -> mumble. I need to pull the Jason> basename out of path strings quite offten, and I'd like to Jason> do so in shell. Jason> Is this ... (wait, this is zsh) How can I do this? $ foo=/usr/local/bin/zsh-3.1.5 $ echo $foo:h -- head /usr/local/bin $ echo $foo:t -- tail zsh-3.1.5 $ echo $foo:r -- root /usr/local/bin/zsh-3.1 $ echo $foo:e -- extension 5 Just like csh can do. -- Paul 12/09/98 12:43 PM --