
正文
shell脚本仅列出当前目录下的文件及文件夹
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
#!/bin/bash
function ergodic(){
for file in ` ls $ `
# do
# if [ -d $"/"$file ]
# then
# ergodic $"/"$file
# else
# wc -L $"/"$file | cut -d' ' -f1 >> /home/huanghongbo/out
# fi
# done
do
echo $file
done}
INIT_PATH="/home/huanghongbo/"
ergodic $INIT_PATH
参考:






