in reply to sed input line from keyboard

sed() is not Perl. That said, what is wrong with using the Bash variable(s) that contain the command line input data? That is what they are there for. (and, by the way, sed-monks is three doors down on the left.)

----
I Go Back to Sleep, Now.

OGB