脚本用途:遍历当前目录(一层,不递归)
#!/bin/bash
for path in `ls -l /data/deploy|awk -F " " '{print $9}'`
do
if [ -d $path ]
then
echo "文件夹: $path"
else
echo "文件: $path"
fi
done
脚本用途:遍历当前目录(一层,不递归)
#!/bin/bash
for path in `ls -l /data/deploy|awk -F " " '{print $9}'`
do
if [ -d $path ]
then
echo "文件夹: $path"
else
echo "文件: $path"
fi
done