Skip to content

Instantly share code, notes, and snippets.

@colin-kiegel
Last active May 1, 2016 20:46
Show Gist options
  • Save colin-kiegel/96afba4337a42145fbf8 to your computer and use it in GitHub Desktop.
Save colin-kiegel/96afba4337a42145fbf8 to your computer and use it in GitHub Desktop.
Print Weekly Testpage with anacron
#!/bin/bash
lp /usr/share/cups/data/default-testpage.pdf
@colin-kiegel
Copy link
Author

colin-kiegel commented Aug 19, 2015

print testpage bi-weekly 15 minutes after boot.

wget https://gist.githubusercontent.com/colin-kiegel/96afba4337a42145fbf8/raw/print-testpage
sudo chmod +x print-testpage
sudo mv print-testpage /usr/local/bin/
echo "14      15      print-testpage  /usr/local/bin/print-testpage" >> /etc/anacrontab

@colin-kiegel
Copy link
Author

colin-kiegel commented May 1, 2016

If you have multiple printers:

  • print to a named printer lp -d PRINTER -- FILE.
  • list available printers lpstat -p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment