Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hpda!hpcupt1!hpirs!runyan From: runyan@hpirs.HP.COM (Mark Runyan) Newsgroups: comp.unix.questions Subject: Re: Wanted: How to strip off pathnames to obtain filenames. Message-ID: <4750013@hpirs.HP.COM> Date: 9 Sep 88 18:28:32 GMT References: <5968@ihlpf.ATT.COM> Organization: Hewlett Packard, Cupertino Lines: 16 >/ gandalf@csli.STANFORD.EDU (Juergen Wagner) / 5:50 pm Sep 5, 1988 / >If you are using csh, how about: > > % set foo = /usr/john/foo/bar/src/misc/other/bugs/nil.bang > % echo ${foo:t} > nil.bang > % And, if you are using ksh, how about: $ foo=/usr/john/foo/bar/src/misc/other/bugs/nil.bang $ echo ${foo##/*/} nil.bang $ Mark "...Just found that one today..." Runyan