...and since piped inputs are supplied through stdin i thought this works
Note that if you pipe input to the script (or redirect stdin), the script's stdin is no longer connected to the tty, but rather to the pipe.
In other words, if (-t STDIN) would indicate that nothing is being piped to the script, i.e. that it would get its stdin interactively from the terminal.
In reply to Re: Using PIped-in and invocation arguments in same script
by Eliya
in thread Using PIped-in and invocation arguments in same script
by justkar4u
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |