Tips and Tricks site for advanced HP-UX Engineers

10 Nov 19 How to be a yes man

Learning something new is great. Joe Geiger taught me something cool that I should have learned years ago.

Serviceguard users ever wanted to script a cluster change such as a node add.

cmapplyconf -v -P <package file>

Ends with a y/n prompt do you want to apply? Normally that requires input. Not with the yes command:

cmcheckconf -v -P <package file>


# Check return code if not zero stop

if [ ${rc} -ne 0 ]


echo “Checkconf error ${rc}”

exit ${rc}


yes | cmapplyconf -v -P <package file>

# Check return code here as well

Tags: , , , ,

WhatsApp chat