if?[?$#?-lt?1?];then
echo?"usage?$0?[path?or?file]"
exit?-1
fi
if?[?"$1"?=?"/root"?];then
ls?-a?$1?|?tee?13out?
else
echo?"第壹個位置參數不是/root目錄!"
exit?-2
fi
argc=0
for?i?in?$@
do
argc=$(($argc+1))
if?[?$argc?-eq?1?];then
continue
fi
if?[?-f?$i?];then
echo?"$i?的文件內容:"?|?tee?-a?13out
cat?$i?|?tee?-a?13out
elif?[?-d?$i?];then
echo?"$i?為目錄文件"
else
echo?"$i?既不是普通文件也不是目錄文件"
fi?
done