What I want to do is the following:
stdin
A
If you do care about preserving trailing newlines at the end of the output, use this:
myVar=$(cat; echo x) myVar=${myVar%x} printf %s "$myVar"
This uses the trick from here.