Purpose: To check if multiple rpm packages are installed on a linux OS.

Code:
#!/bin/sh
while read i #read from input and assign the variable “i” to each line read.
do
echo “Looking for $i” #print the contents of the variable “i”.
rpm -qa | grep $i #search the rpm index for the contents of the variable “i”.
echo “==========================” #this makes it easy on the eyes.
done