递归枚举文件并操作
#!/bin/bash
CURDIR=$(cd $(dirname $0); pwd)
export GOPATH=$CURDIR/..
echo GOPATH=$GOPATH
cd $GOPATH/src/battle/luajit_c/src
luafiles=$(find $CURDIR -name '*.lua')
for i in ${luafiles[@]}
do
echo $i
./luajit -b $i $i
done
read -p "press any key to exit" -n 1 -r