Created
February 4, 2016 10:17
-
-
Save codeopensrc/ab2945786bc5593cd6fe to your computer and use it in GitHub Desktop.
Linux print remote -> local, local -> remote strictly from command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Have a printer hooked up to linux os | |
# Have CUPS installed on it and make sure the printer prints from linux | |
# Have abiword (This is used to convert file to pdf via command line) | |
# sudo apt-get install abiword | |
cat dev.json | ssh user@ip 'cat - > tmp.doc; abiword --to=pdf tmp.doc; lp tmp.pdf; rm tmp.doc' | |
# Havent tested with removing the pdf right after issuing lp, might work. | |
# Also havnt tested converting other files besides .doc to .pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment