If you are using csh, how about: % set foo = /usr/john/foo/bar/src/misc/other/bugs/nil.bang % echo ${foo:t} nil.bang % -- Juergen "Gandalf" Wagner, gandalf at csli.stanford.edu Center for the Study of Language and Information (CSLI), Stanford CA