#/bin/bashecho -e "The program will Judge a file is or not a device file.\n\n"read -p "Input a filename:" filename
if[ -b $filename -o -c $filename];thenecho"$filename is a device file"exit 0
elseecho"$filename is not a device file"exit 1
fi
终端输入一个文件名,判断是否是设备文件#/bin/bashecho -e "The program will Judge a file is or not a device file.\n\n"read -p "Input a filename:" filenameif [ -b $filename -o -c $filename ]; then echo "$filename is a device file" exit 0else echo "$filename is