Thursday, October 14, 2010

Look at the latest patch number in solaris

Here is a quick way to print out just the latest patch versions on a solaris box:
showrev -p | perl -lane '($p,$rev) = ($F[1] =~ /(\d+)-(\d+)/); $has{$p}=$rev if $has{$p}<$rev; END { map { print "$_-$has{$_}" } sort keys %has }'