I have solaris machine ( solaris 10 )please Look on the following simple commands (haconf -makerw | grep -iq Cluster already writable)    # haconf -makerw       VCS WARNING V-16-1-10364 Cluster already writable.    haconf -makerw | grep -iq Cluster already writable    # echo $?    0I get exit status 0 from grep , and this is right ( because we get the exe status always the last command )butmy question is: how to get the exit status ( $? ) from the command haconf -makerw  in place of grep?or what need to add in to my syntax in order to understand if haconf -makerw succeeded ?    haconf -makerw | grep -iq Cluster already writable    # echo $? ( will print the exe status from haconf -makerw  )
how to get exit status from the command before the last
linux;bash;shell script;solaris;command