First thought is that sudo is looking for a password, which, by default, it gets from the terminal rather than stdin. Adding "-S" may help - but I would expect in this case that sudo would be failing for lack of password.
In reply to Re: stty: standard input: Invalid argument
by Tanktalus
in thread stty: standard input: Invalid argument
by xorl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |