Unix & Linux Asked by The Codesee on November 6, 2021
I have an executable file file
that I am running by typing ./file
into the terminal. When the program runs, I have to type in the text "code". However, the time taken to type it, or paste it into the terminal, results in the program saying "sorry, you took too long!".
I am tying to send the text "code" to the executable file when I run it, as therefore it would be inputted into the program immediately once it’s run.
I’ve tried ./file; "code"
and ./file && "code"
but have had no luck – the program still wants an input.
You may want to use the pipeline feature https://en.wikipedia.org/wiki/Pipeline_(Unix) :
echo "code" | ./file
Answered by Artem S. Tashkinov on November 6, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP