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

📄 printer_check

📁 Advanced Bash&#8722 Scripting Guide An in&#8722 depth exploration of the art of shell scripting Me
💻
字号:
#!/bin/sh# Script name: 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 return 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*echoecho "Please turn the printer on now."echo "Press return to continue"read ANYTHING		# Stall until the user turns the printer 			# back onecho			# A blank line is printed/etc/init.d/lp start	# Start the printer

⌨️ 快捷键说明

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