Maybe you could check if STDIN is opened to a terminal/console:
if (-t STDIN) { ...
In reply to Re^3: Detecting forground and background process
by almut
in thread Detecting forground and background process
by astroboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |