#!/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 |grep -i ^require_once|egrep -v "^ \*"|cut -f 2 -d "\""|sed -e "s/\//_/"|cut -f 1 -d "."` if [ -n "$j" ]; then echo "Requires: pear($j)" fi j="" done