#!/bin/sh if [ $# -lt 1 ]; then echo "You have to specify input file" exit 1 fi filelist=`echo $@` for i in $filelist; do j=`cat $i |egrep -i "^Class" |cut -f 2 -d " "` if [ -n "$j" ]; then echo "Provides: pear($j)" fi j="" done