Skip to content

Instantly share code, notes, and snippets.

@fatho
Created October 19, 2016 14:19
Show Gist options
  • Save fatho/73829e00b69a3a105677fce6b2dac069 to your computer and use it in GitHub Desktop.
Save fatho/73829e00b69a3a105677fce6b2dac069 to your computer and use it in GitHub Desktop.
Script to automatically send files for printing to the UU print service.
#!/bin/bash
STUDENT_ADDRESS="<student>@students.uu.nl"
PRINT_ADDRESS="print@uu.nl"
( printf "From: $STUDENT_ADDRESS\n"
printf "To: $PRINT_ADDRESS\n"
printf "Subject: print job\n\n"
for file in "$@"
do
uuencode "$file" $(basename "$file")
done
) | msmtp --read-envelope-from -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment