This doesn't do what you might think it does. The intent of the script is to create a directory, execute a program that dumps the output into that directory, change the current working directory to that location, display the contents, and exit into that directory. This script fails to do this since bash forks and execv's the script, which is then a child process to the shell, then returns the return code of the last program executed in the script.Code:#!/bin/sh /bin/mkdir /somedir /usr/local/bin/somepgm --output /somedir cd /somedir /bin/ls
Is there some way that will allow me to keep the script in the current process stream? I've looked and haven't found anything yet, but again, I'm terrible at searching the web.
Thanks in advance for any assistance you can/will provide.



LinkBack URL
About LinkBacks



