发布网友 发布时间:2022-04-24 17:39
共1个回答
热心网友 时间:2023-10-27 05:59
//是目录不是文件夹
#! /bin/bash
# filename:FileType.sh
read -p "Please input the filename :" filename
fpath=$filename
if [ -d $fpath ];
then
echo "$fpath is a direstory.";
elif [ -e $fpath ];
then
echo "$fpath is a file.";
else
echo "$fpath is NOT a file or direstory.";