Summary: Like we have Stdout Stderr, I would like to create Stdstatus. Stdout can be stored in array and Stdstatus can be printed for user. I didn't know that stderr could be used for other messages also. But, for the sake of implementing Stdstatus, is it possible?
I have:
SomeFunction(){
PrintForArray
echo "Status"
}
mapfile -t SomeArray < <(SomeFunction)
The output of PrintForArray is to be stored in SomeArray, but I also want to print some Status to the command line. The Status must not be stored in the array!
Any suggestions?
Note:
This might be useful: What does "3>&1 1>&2 2>&3" do in a script? - Unix & Linux Stack Exchange, but I am not sure how to use this for function
Status is meant to be read by the user.
It may or may not be stored in a log file (both suggestions are welcomed).
I don't want to send it to standard error as the Status is not Error, I just want the User to be informed what is going on!