Hi, -------- Original-Nachricht -------- > Von: "Zhu Lihua" <[EMAIL PROTECTED]> > I was puzzled while I was running the batch file "ooo_releasetests.sh" in > linux. I'm not familar with linux batch file. > > my_dir=`dirname "$0"` > "$my_dir/run_tests.sh" < "$my_dir/../ooo_releasetests.lst" > > > The first line seems to assign the path name of the run_test.sh located to > the variable my_dir.
correct > > and the 2nd line seems to input the list file in the parent directory to > the "run_tests.sh" batch file. correct > I replace the word dirname with the dirctory "/qa/qatestool/script/unix". > the following messages are given: > > /qa/qatesttool/script/unix: is a directory. > > /../ooo_releasetests.lst: no such file or directory. > > why this? And what does the "$0" mean? "$0" expands to the full file name (including path) of the script. The command dirname $0 will give the path of the current script. Note that "dirname" is considered as command in this case (enclosed in `). So if you replace the command "dirname" by the directory name, this will fail (a directory cannot be executed). This very small script is only there, because we once had a script "ooo_releasetests.sh" containing all testcases to run. I then separeted data (now ooo_releasetests.lst) from code (now ooo_releasetests.lst). The run_tests.sh script is still in place, just in case anyobody had this in her environment. To make it short - it is better to execute /qa/qatestool/script/unix/run_tests.sh </qa/qatestool/script/ooo_releasetests.lst André -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
