afsipmh@cidsv01.cid.aes.doe.CA (05/13/91)
In the C shell if you have a variable z=/a/b/c/d then scho $z:t will give you just d. Is there something equally as trivial in the Bourne shell? Basically I want to be able to get the name of a script out of $0 without the path. This surely is a wheel that has already been invented. -- Pat Hertel Canadian Meteorological Centre Analyst/Programmer 2121 N. Service Rd. phertel@cmc.aes.doe.ca Dorval,Quebec Environment Canada CANADA H9P1J3
dkeisen@leland.Stanford.EDU (Dave Eisen) (05/15/91)
In article <1991May13.130524.5466@cid.aes.doe.CA> afsipmh@cidsv01.cid.aes.doe.CA () writes: >In the C shell if you have a variable z=/a/b/c/d then scho $z:t >will give you just d. I don't know if all unices have it, but all the ones I work on have basename (1). -- Dave Eisen dkeisen@leland.Stanford.EDU 1101 San Antonio Road, Suite 102 (Gang-of-Four is being taken off the net) Mountain View, CA 94043 (415) 967-5644