标签:echo link file class 鼠标 一个 not code div
题目:
终端输入一个文件名,判断是否是设备文件。
答案:
#!/bin/bash echo -e "please input a filename to judge it is or not a device file.\n\n" read -p "Input a filename: " filename if [ -b $filename -o -c $filename ]; then echo "$filename is a device file" exit 0 else echo "$filename is not a device file" exit 1 fi
扩展:
文件类型判断:
标签:echo link file class 鼠标 一个 not code div
原文地址:https://www.cnblogs.com/wanghao-boke/p/12152261.html