Print Out Last Revision Only in List of Patches in Solaris

Posted February 21, 2005 by Michilimackinac in Solaris

The command provided in this tech-recipe will print out a list of patches that omits earlier revisions of the same patch. This can be useful for checking if a system is at the same level as another system (via a diff) but possibly went through a different patch cycle and ended with different patches at lower revisions.

Use the following command:

showrev -p | awk -F- ‘{hold0=$0; hold=$1; while (getline > 0) { if (hold!=$1) {print hold0; hold0=$0} if (hold=$1) hold0=$0 } }’

The Conversation

Follow the reactions below and share your own thoughts.