Suppose someone writes a bash script in which to disable stdout, stderr and provide user output.
Is it possible to use the function as shown below:
dump(){
"$@" > /dev/null 2>&1
}
And then
dump rm filename || echo "custom-message"
What are the possible cases when it does not work properly?
source
share