In my shell script I am running a command which is asking me for input.
How can I give the command the input it needs automatically?
For example:
<
There definitely is... Use the spawn, expect, and send commands:
spawn test.sh
expect "Are you sure you want to continue connecting (yes/no)?"
send "yes"
There are more examples all over Stack Overflow, see: Help with Expect within a bash script
You may need to install these commands first, depending on your system.