I have a misbehaving program that I need to call from my script. It exits as soon as it sees something on stdin. Is there a way to close stdin?
Is there a way to close stdin?
Closing File Descriptors
n<&-Close input file descriptor n.
Source Chapter 20. I/O Redirection
Just pipe in a program with no output:
: | misbehaving_program
Found it, you can close stdin with:
According to what you say, you might fix your problem by simply
pickyProgram < /dev/null