Send string to stdin

Is there a way to effectively do this in bash:

/my/bash/script < echo 'This string will be sent to stdin.'

I’m aware that I could pipe the output from the echo such as this:

echo 'This string will be piped to stdin.' | /my/bash/script

6 Answers
6

Leave a Comment