How to store standard error in a variable
Let’s say I have a script like the following: useless.sh echo “This Is Error” 1>&2 echo “This Is Output” And I have another shell script: alsoUseless.sh ./useless.sh | sed ‘s/Output/Useless/’ I want to capture “This Is Error”, or any other stderr from useless.sh, into a variable. Let’s call it ERROR. Notice that I am using … Read more