I'm trying to find a way to use an input file for a program in such a way that I can also use stdin. For example, say I have a SQL script that creates a table. I invoke it like this: mysql -p ...
Say I'd like to use the file -f - command inside a script, and send some input using the stdin, when I'm finished I'd like to terminate it gracefully, but unfortunately I haven't found any way to do ...
For example, the following works fine: /usr/bin/program It produces some output, and gets to result. But if I invoke it like this: echo -n | /usr/bin/program or this echo -n | bash -c ...
Consider the interactive program interactive. I have to run this program fairly frequently, and each time I run it the first few commands are the same. Obviously, having to type those commands over ...
From what I know, parameters you pass to a command, goes to it's STDIN stream. so this: cut -d. -f2 'some.text' should be perfectly identical to this: echo 'some.text' | cut -d. -f2 as we send ...