⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex65.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash#  delete.sh, not-so-cunning file deletion utility.#  Usage: delete filenameE_BADARGS=65if [ -z "$1" ]then  echo "Usage: `basename $0` filename"  exit $E_BADARGS  # No arg? Bail out.else    file=$1          # Set filename.fi  [ ! -f "$file" ] && echo "File \"$file\" not found. \Cowardly refusing to delete a nonexistent file."# AND LIST, to give error message if file not present.# Note echo message continued on to a second line with an escape.[ ! -f "$file" ] || (rm -f $file; echo "File \"$file\" deleted.")# OR LIST, to delete file if present.# Note logic inversion above.# AND LIST executes on true, OR LIST on false.exit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -