Print the output of a command to the default printer (see lpstat command)

lp

echo "test" | lp

click the source code to copy install lp on any operating system with command-not-found.com