Re: PATH and $0

2006-07-12 Thread Stephane Chazelas
On Tue, Jul 11, 2006 at 08:19:34PM -0400, Dave Rutherford wrote: > On 7/11/06, Cai Qian <[EMAIL PROTECTED]> wrote: > >I want its full pathname using 'dirname', but it will give me > >unexpected result on some Linux or Bash versions. > > Well, 'dirname' certainly won't do what you want, but I'm sor

automatic code generation

2006-07-12 Thread box
I'm trying to a write a script to automatically generate some .cpp & .h files. I have the templates in external files which look something like this: void ${NAME}Panel::showEvent(QShowEvent *e) { ...code } I want to be able to run my script, have it read the contents of the files while

Re: automatic code generation

2006-07-12 Thread Paul Jarc
box <[EMAIL PROTECTED]> wrote: > void ${NAME}Panel::showEvent(QShowEvent *e) { > ...code > } > > I want to be able to run my script, have it read the contents of the files > while replacing ${NAME} with a variable that is defined elsewhere in my > script. NAME=... eval "cat < output-file

Re: PATH and $0

2006-07-12 Thread Cai Qian
Hi, On 7/12/06, Stephane Chazelas <[EMAIL PROTECTED]> wrote: On Tue, Jul 11, 2006 at 08:19:34PM -0400, Dave Rutherford wrote: > On 7/11/06, Cai Qian <[EMAIL PROTECTED]> wrote: > >I want its full pathname using 'dirname', but it will give me > >unexpected result on some Linux or Bash versions. >