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

📄 ex24.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash# Faxing (must have 'efax' package installed).EXPECTED_ARGS=2E_BADARGS=65MODEM_PORT="/dev/ttyS2"   # May be different on your machine.#                ^^^^^      PCMCIA modem card default port.if [ $# -ne $EXPECTED_ARGS ]# Check for proper number of command line args.then   echo "Usage: `basename $0` phone# text-file"   exit $E_BADARGSfiif [ ! -f "$2" ]then  echo "File $2 is not a text file."  #     File is not a regular file, or does not exist.  exit $E_BADARGSfi  fax make $2              #  Create fax-formatted files from text files.for file in $(ls $2.0*)  #  Concatenate the converted files.                         #  Uses wild card (filename "globbing")			 #+ in variable list.do  fil="$fil $file"done  efax -d "$MODEM_PORT"  -t "T$1" $fil   # Finally, do the work.# Trying adding  -o1  if above line fails.#  As S.C. points out, the for-loop can be eliminated with#     efax -d /dev/ttyS2 -o1 -t "T$1" $2.0*#+ but it's not quite as instructive [grin].exit $?   # Also, efax sends diagnostic messages to stdout.

⌨️ 快捷键说明

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