#!/bin/sh
rm -rf fred*
echo "fred1" > fred1
echo "fred2" > fred2
mkdir fred3
echo "fred4" > fred4
for file in fred*
do
if [ -d "$file" ];then
break;
fi
done
echo "first directory starting fred was $file"
rm -rf fred*
exit 0
阅读(1079) | 评论(0) | 转发(0) |