----- Original Message ----- From: "David Bolt" <bcrafhfr@davjam.org> To: <opensuse@opensuse.org> Sent: Monday, September 29, 2008 10:02 AM Subject: Re: [opensuse] bash pipe
On Mon, 29 Sep 2008, drek wrote:-
Hello,
In a script I want to know in which directory I am, but I don't want to know the whole path.
This should do:
WHICHEVER_VARIABLE_NAME_YOU_WANT=${PWD##*/}
Ahh finally! Phew I was wondering if _anyone_ was going to say anything other than the unnecessary process fork of running basename. -- Brian K. White brian@aljex.com http://www.myspace.com/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org