getting patch information

Can we get a script to find out a perticular patch installed on solaris 8, 9.

no need for a script ... just do ... (replace 123456-00 with the actual patch number and not the double quotes around it) ...

showrev -p | awk '$2 = "123456-00"' 

or ... if you run into an error with patches having too many fields ...

showrev -p | grep 123456 | awk '$2 == "123456-00"'