Actually, you can't tell any of them. Isatty only tells you whether the file descriptor is a terminal or not, which has no correllation to whether input has been redirected. -Ron