on mac and linux you can use lp
NAME
lp - print files
SYNOPSIS
lp [ -E ] [ -U username ] [ -c ] [ -d destination[/instance] ] [ -h
hostname[:port] ] [ -m ] [ -n num-copies ] [ -o option[=value] ] [ -q
priority ] [ -s ] [ -t title ] [ -H handling ] [ -P page-list ] [ -- ]
[ file(s) ]
lp [ -E ] [ -U username ] [ -c ] [ -h hostname[:port] ] [ -i job-id ] [
-n num-copies ] [ -o option[=value] ] [ -q priority ] [ -t title ] [ -H
handling ] [ -P page-list ]
DESCRIPTION
lp submits files for printing or alters a pending job. Use a filename
of "-" to force printing from the standard input.
THE DEFAULT DESTINATION
CUPS provides many ways to set the default destination. The LPDEST and
PRINTER environment variables are consulted first. If neither are set,
the current default set using the lpoptions(1) command is used, fol-
lowed by the default set using the lpadmin(8) command.