From: Eric Hodel Date: 2008-03-25T08:50:04+09:00 Subject: Re: $stdin On Mar 24, 2008, at 07:51 AM, Stefan Gremm wrote: > my question is, how can i ask, if text in $stdin, without the > program is > waitung for input. Here's one way, but it isn't foolproof. $ ruby -e 'p $stdin.tty?' true $ ruby -e 'p $stdin.tty?' < /dev/null false $ cat /dev/null | ruby -e 'p $stdin.tty?' false