Skip to content

Instantly share code, notes, and snippets.

@qmahoney
Last active December 18, 2020 20:12
Show Gist options
  • Save qmahoney/ec6c02176f0fe897b6d8c4169e8fa0cc to your computer and use it in GitHub Desktop.
Save qmahoney/ec6c02176f0fe897b6d8c4169e8fa0cc to your computer and use it in GitHub Desktop.
Fake Athena header page
#!/bin/bash
# Copy banner.ps and owl.ps from:
# http://athena10.mit.edu/trac/browser/trunk/third/lprng/athena?rev=13556
echo "/user (`whoami`) def" > vars.ps
echo "/host (`hostname`) def" >> vars.ps
echo "/queuejob () def" >> vars.ps
echo "/date (`date +"%A, %e %B %Y %H:%M:%S"`) def" >> vars.ps
echo "/motd () def" >> vars.ps
# /graph /biggraph /hex /loglog /polar /staff /bigstaff /blank
echo "/bannertype /graph def" >> vars.ps
cat vars.ps owl.ps banner.ps | ps2pdf - header.pdf
@2n3906
Copy link

2n3906 commented Jun 7, 2016

I'm going to start printing these at work.

@qmahoney
Copy link
Author

Awesome, @jcbarret! And thanks, I fixed the revision.

Also, I had the date format wrong. It's %e instead of %d, and there's an extra space between the year and the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment