Re: About dash as sh
> When the shell is using standard input and it invokes a command that
> also uses standard input, the shell shall ensure that the standard
> input file pointer points directly after the command it has read when
> the command begins execution.
>
> But I consider this clause is misguided, it should apply only when the
> input is a tty.
And if it's not a tty, you get some kind of Undefined Behavior?
I don't think I'd like that because I don't think the benefit would be worth
the UB troubles.
> Relying on it is a terrible idea.
I'd tend to agree.
Stefan
Reply to: