20 lines
331 B
Bash
Executable File
20 lines
331 B
Bash
Executable File
#!/bin/sh
|
|
if [ $# -lt 1 ]; then
|
|
echo "You have to specify input file"
|
|
exit 1
|
|
fi
|
|
|
|
filelist=`echo $@`
|
|
for i in $filelist; do
|
|
i=`echo $i | grep "\.php$"`
|
|
if [ -n "$i" ]; then
|
|
j=`cat $i |grep -E -i "^Class" |cut -f 2 -d " "| tr -d "\r"`
|
|
if [ -n "$j" ]; then
|
|
for p in $j; do
|
|
echo "pear($p)"
|
|
done
|
|
j=""
|
|
fi
|
|
fi
|
|
done
|