Redirecting stdout from one Bash script to another
Posted on 2010-11-10
I am wanting to know how it would be possible to write a bash shell script that would pass a set of arguments to a child bash script yet still return the stdout from the child script to the main terminal.
For example, I want to write a bash script which will will auto-populate the arguments (specifically the date argument) of the child script - report_runner.sh, yet still return the run status text that report_runner.sh generates in the terminal:
/../../../current/bin/report/report_runner.sh -e prod-like -r reviewCount 20101011
I want the terminal output from report_runner.sh to be returned to the screen of the parent script calling it. The reason why I can't modify report_runner.sh to populate the date automatically itself is that it is controlled code and I do not want to update this script if I can avoid it.