My problem is the following. If I want just the exit code of a command I can do the following inside a shell script:
#!/bin/bash
rV=$(rpm -qi python | 'Version')
echo $? # echo the return code
echo $rv # echo the output produced from the command
With the filedescriptors you can redirect stdin, stdout and stderr to different files and other things. But I don't want to read/write to files. So are there also predefined return values such as '$?' for stdout and stderr, e.g., '$out' and '$err'. And if this is not the case is there a solution similar to this:
#!/bin/bash
#ar is an array
ar=myCommand and some other operations that at the end 'ar' looks like this:
ar=[stdout, stderr, returncode]
Best regards and thx in advance :)