Bash Passing String to Command, Awaiting User Input

Bash Passing String to Command, Awaiting User Input

I am trying to pass a string to command which waits for input to be entered on command line, I need to automate the user input process, luckily the string is static it wont change, I can hardcode it. Things I have tried so far

  1. echo "hardcoded string" | /tmp/command
  2. /tmp/command < hardcoded.txt

It still it asks input, i cannot use expect or autoexpect.

1
Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.