1

I have to run a bash script bash.sh that starts up a command line tool.

That command line tool has a prompt that says Please enter your email:

I then need a way to programmatically enter my email after the prompt.

I have tried simply myemail@email.com and I have tried echo myemail@email.com. Neither seem to work because the prompt does not allow me to run any more commands.

Is this doable?

samcorcos
  • 2,330
  • 4
  • 27
  • 40

1 Answers1

1

Pass it to stdin:

command_line_tool <<< "my@email.com"

Further reading:

hek2mgl
  • 152,036
  • 28
  • 249
  • 266