I've seen this done and I used to be able to do it. I had it documented in a file that was clobbered recently in a backup issue.
I have a text string I want to print from bash using lpr. I know I can print text files easily, but how can I print text that is just in quotation marks or in a string without first saving it as a file, then printing the file?
You could use here-strings with bash
lpr <<< "text string"
or if your string is contained in a variable
lpr <<< "$var"