How can I run a program in bash in such a way that first it receives some input from a file, and then, as the file ends, it will receive input from terminal?
somecommand <<< "someinput"
cat myfile - | program
cat myfile /dev/stdin | program
Use echo, which has the same end result:
(echo "someinput"; cat) | program
4 years ago