I'm trying to avoid printing messages to the console received when a lun is not found during an ssh command. SSH is to a NetApp filer. Command is being run on a Solaris 10 host.
Here is some of the code I am executing:
for filer in <list>
do
echo $filer
ssh $filer lun show <lunpath> |grep vol
...
done
If the LUN is found the code works fine, but if the LUN is not found the SSH command returns "lun show: No such LUN exists"
I've tried multiple grep and egrep commands, including -v variants... but I still get the "lun show: No such LUN exists" message printed to the console.
What do I have to do to skip printing this line to the console?