1 2 3 4 5 6 7 8 9
#!/bin/sh case "$1" in -*|'') ;; *) echo "Warning: $0: ignoring stdin and using first argument as input ($1)" >&2 exec < "$1" shift ;; esac expand | text2png | lp "$@"