So I am trying to make a bash script that calls this one command and then feeds it the input. It calls this one command and the command needs 3-4 inputs after. I type the co
A couple of ways.
Group all the echo commands and pipe them to the command:
{ echo $firstname; echo $lastname ; } | somecommand
or use a heredoc:
somecommand <<EOF $firstname $lastname EOF