demofun(){ for file in `ls $1` do if test -f $file then echo "file: $file" elif test -d $file then echo "path: $file" fi done } path="/home/lwang/Desktop/wujuan" demofun $path
linux循环遍历文件夹下所有文件
猜你喜欢
转载自www.cnblogs.com/juan-F/p/10038380.html
今日推荐
周排行