Skip to content

Instantly share code, notes, and snippets.

@danthegoodman
Created May 8, 2013 04:16
Show Gist options
  • Save danthegoodman/5538160 to your computer and use it in GitHub Desktop.
Save danthegoodman/5538160 to your computer and use it in GitHub Desktop.
Shell command to print a file to a room in the ECS building at Baylor University. It hasn't been tested since 2011, so room numbers may be out of sync or the command may not work. Use at your own risk.
#!/bin/bash
# Usage: printECS ROOM FILE
# Prints to a room in the Rodgers building
ECS_LOGIN=bobbybear@wind.ecs.baylor.edu
case $1 in
214);;
113);;
112);;
*) echo "Give a location! 112, 113 or 214."
esac
if [[ -n "$2" ]]; then
cat $2 | ssh $ECS_LOGIN "lpr -P ecs$1"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment