shell 递归枚举文件并操作

递归枚举文件并操作

#!/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
posted @ 2018-08-06 15:33  MrBlue  阅读(583)  评论(0编辑  收藏  举报