Created
May 9, 2014 17:40
-
-
Save jepio/eb1718de04c3cfe05482 to your computer and use it in GitHub Desktop.
Print documents at GSI, pass printer number and filename. Needs a gsi host defined in ssh config.
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
#!/bin/bash | |
# copies a file to the gsi lx-pool, | |
# prints it and then removes it. | |
# | |
if [ "$#" -eq 2 ]; then | |
scp $2 gsi:$2 | |
ssh gsi "pop -p$1 $2 2>&1 ; rm $2" > /tmp/log | |
cat /tmp/log && rm /tmp/log | |
else | |
echo "Use with 2 parameters: printer number (no p) and file name." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment