I try to do the following in a shell script:
bash;
in the bash context:
- run
./a.out
And In ./a.out context I need to simulate keystorkes:
yes
3292
no
How can I do it? All my tries failed since &, && and ; executes the subsequent command in the main shell context and not in the bash.
bash && echo "yes" > /dev/console
I have seen use expect in shell script aren't there any alternative using native shell commands ? I don't want to be dependent on other tools.