Running shell commands with Automator: how to create a droplet launching an "exec" command?
In the Run Shell Script action, change Pass input:, (upper right hand corner of the action), from to stdin to as arguments. Then you can get the result of the previous action passed to a shell script as an argument. Example:
lpr -o ImageableArea=DS_8x6 -o PageRegion=DS_8x12 -o
PageSize=DS_8x12 -o media=DS_8x12 $1