diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-04-01 13:42:57 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-04-01 13:42:57 -0300 |
commit | d143a87c11c37f29a788cfd069bb8377f3203c04 (patch) | |
tree | 2c19c13fe2d38bf62db560968346c601fb40e085 | |
parent | ee111b0a940badb559ec918209e2f17b6f4b14ad (diff) | |
download | scripts-d143a87c11c37f29a788cfd069bb8377f3203c04.tar.gz scripts-d143a87c11c37f29a788cfd069bb8377f3203c04.tar.bz2 |
Adds lpr-ssh
-rwxr-xr-x | lpr-ssh | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#!/bin/bash +# +# LPR over SSH. +# + +# Parameters +BASENAME="`basename $0`" +SERVER="$1" + +# Shift +shift + +# Check +if [ -z "$1" ]; then + echo "usage: $BASENAME <server> <file>" + exit 1 +elif [ ! -e "$*" ]; then + echo "no such file: $*" + exit 1 +fi + +# Proceed +cat "$*" | ssh $SERVER lpr |