lpr -P Physics262 textfile is the command to print a text file to the printer Physics262.
Using pipes, print all lines of list1 and list2 containing the letter 'p', sort the result, and print to the printer Physics262.
% cat list1 list2 | grep p | sort | lpr -P Physics262
Adapted for Mac OS X by Shane Burns from a tutorial by M.Stonebank@ee.surrey.ac.uk, © November, 2002