Handling temporary files in Bash -
i need copy , execute bash script within parent bash script, when job done (and if fails) need parent script remove child script file copied.
here's code snippet i'm working on:
if [ -e $repo_path/install ]; cp $repo_path/install $install_path exec $install_path/install rm $install_path/install fi this fails reason, seems exit altogether when child process ends. correct use exec example?
exec replaces current process, statements after never reached.
you may replace exec sh or bash, or remove if child script executable.
see also: the bash reference manual exec
Comments
Post a Comment