I have script1 which calls script2 which contains an echo statement. I want script1 to send the echo returned by the script2 to a named_pipe.
Is there a way to do it without having to change the code of script2? Like "capturing" the echo statements?
SCRIPT1:
...
case ${input_args[0]} in
SCRIPT2)
./SCRIPT2.sh ${input_args[1]};;
...
SCRIPT2:
echo "OK: done!"