Quote:
Originally Posted by chimu
Hmm.. what about just saving stderr and ignoring output (stdout)? I'm not interested in output but just wanted error messages.
|
Try to get both stdout and stderr:
Just get stderr but send stdout to /dev/null
Code:
var=$(cmd1 2>&1 >/dev/null)
__________________
Vivek Gite
Linux Evangelist

Be proud
RHEL user, and let the world know about your enterprise choices!
Join RedHat user group.

Always use
CODE tags for posting system output and commands!

Do you run a Linux? Let's face it,
you need help