Skip to content

Instantly share code, notes, and snippets.

@mauris
Last active January 14, 2018 23:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauris/03a334ba8576bc6c2e8897a4717f535e to your computer and use it in GitHub Desktop.
Save mauris/03a334ba8576bc6c2e8897a4717f535e to your computer and use it in GitHub Desktop.
#!/bin/sh
# Printing PDF files from your command prompt.
# 1. Create a "print" folder in your home directory.
# 2. Put this "print.sh" in the "print" folder.
# 3. Run "chmod +x print.sh" to make me executable
# 4. For each time you want to print PDF files:
# i) Place a copy of the PDF files in the "print" folder
# ii) run "./print.sh"
# iii) Go to print and pull your prints
# iv) This file will also remove all PDF files from your "print" folder
# Have fun. - Sam
for file in *.pdf
do
echo "Printing file $file..."
lp "$file"
rm "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment