#!/bin/bashecho "检测文件类型"read -ep "请输入要检测的路径" fileif [ ! -e $file ]then echo "文件不存在,请检查输入是否正确"elif [ -L $file ]then echo "链接文件"elif [ -d $file ]then echo "目录"elif [ -f $file ]then echo "普通文件"else echo "其他文件类型"fi