I need help sending the output (stdin and stdout) from system commands to a bash function, while still accepting input from arguments. Something like the example that follow
There are 2 ways of doing so, first, which I think is better, is to create a bash file and pass the result to it like this:
make 2>&1 > ./LogMsg
the second way is to pass result as an argument to function:
LogMsg $(make 2>&1)