PDA

View Full Version : Scripting questions



fullmetalcoder
22nd May 2006, 10:31
I'm not a newbie coder but my knowledge hardly go outside of z80 asm and C++. I only played a few times with scripts (mainly javascript and php BTW) and I'm now forced to use shell script...

1) how to get the equivalent of QCoreApplication::applicationDirPath() with a shell ??? I'm pretty sure it can be done by combining two variables : $0 and $PWD but I don't know how...

2) man pages are pretty poor, where could I find a good tutorial on writing efficient and portable shell script?

jacek
22nd May 2006, 14:02
how to get the equivalent of QCoreApplication::applicationDirPath() with a shell ???
Try:DIR=`dirname $0`


man pages are pretty poor, where could I find a good tutorial on writing efficient and portable shell script?
What shell do you use?

http://tldp.org/LDP/abs/html/index.html