查看文件及目录-shell学习
for file in "$@"; do thisfile=${thisfile:-$PWD}/$fileif [ -d "$thisfile" ]; then
if [ $count -eq 1 ]; then
echo -e $line$file/
#echo -e "end!"
tab=${tab%"$singletab"}"\t"
redir $(ls $thisfile)
else
echo -e $line$file/
#echo -e "this is directory!"
redir $(ls $thisfile)
fi
else
echo -e $line$file
#echo -e"this is a file,you can do anything you want!"/
fi
thisfile=${thisfile%/*}
let count=count-1
done
页:
[1]