dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 3776a1497bb4534a944ef504dda161789bfe3040
parent d0c97456f6445f84f1b8568149376114b9e1e3b9
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 12 Jun 2020 13:02:39 +0200

Add script for printing at work with windows network printer

Diffstat:
A.local/bin/printgeo | 39+++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+), 0 deletions(-)

diff --git a/.local/bin/printgeo b/.local/bin/printgeo @@ -0,0 +1,39 @@ +#!/bin/sh +# requirements: samba + +die() { + printf '%s: error: %s\n' "${0##*/}" "$1" >&2 + exit 1 +} + +usage() { + printf 'usage: %s [-h] file ...\n' "${0##*/}" +} + +while :; do + case "$1" in + -h) + usage + exit 0;; + --) # end all options + shift + break;; + -?*) + die "unknown option specified: $1";; + *) # No more options + break + esac + shift +done + +if [ $# -lt 1 ]; then + usage + exit 1 +fi + +pass="$(pass Uni/mit.au.dk-217756)" +for f in "$@"; do + smbclient //prt11.uni.au.dk/1672-129-c-1 \ + -U "au217756%${pass}" -W uni \ + -c "print $f" +done