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
相關文章
相關標籤/搜索