#!/bin/sh if [ $# -lt 1 ]; then echo "You have to specify input file" exit 1 fi for i in `echo $@`; do i=`echo $i | grep "\.php$"` if [ -n "$i" ]; then j=`cat $i | grep -i ^require_once | egrep -v "^ \*" | sed -e "s/['|\"]//" | sed -e "s/(/ /" | cut -f 2 -d " " | sed -e "s/\//_/g" | cut -f 1 -d "."` if [ -n "$j" ]; then for p in $j; do echo "pear($p)" done j="" fi fi done