I have a script that calls an application that requires user input, e.g. run app that requires user to type in \'Y\' or \'N\'.
How can I get the shell script not to ask
If the app reads from stdin (as opposed to from /dev/tty, as e.g. the passwd program does), then multiline input is the perfect candidate for a here-document.
#!/bin/sh
the_app [app options here] <
As you can see, here-documents even allow parameter substitution. If you don't want this, use <<'EOF'.