Say, I have a program called "tree". It takes as input a text file containing some dictionary of English words, call it engDict.txt.
In my terminal, I would execute this program using the following command:
>> ./tree engDict.txt
Assuming this program automatically reads in the file and processed it. Then, it prompts the user: Would you like to exit the program (y/n)?
Now, my question is:
How can I send input to this program in one line?
For example, I tried the following, but it doesn't do what I'd like.
>> ./tree engDict.txt | n
or
>> ./tree engDict.txt ; n
c++tag there. This is basically anixquestion.