printer_check

来自「UNIX+shell范例精解(第4版)代码」· 代码 · 共 19 行

TXT
19
字号
#!/bin/sh# Scriptname: printer_check# Script to clear a hung up printer for SVR4if [ $LOGNAME != root ]then	echo "Must have root privileges to run this program"	exit 1ficat << EOFWarning: All jobs in the printer queue will be removed.Please turn off the printer now. Press Enter when youare ready to continue. Otherwise press Control-C.EOFread ANYTHING      # Wait until the user turns off the printerecho/etc/init.d/lp stop       # Stop the printerrm -f /var/spool/lp/SCHEDLOCK /var/spool/lp/temp*echo

⌨️ 快捷键说明

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