Check input device is a terminal: Difference between revisions
Content added Content deleted
No edit summary |
(Added Crystal version) |
||
Line 64: | Line 64: | ||
$ echo "" | sbcl --script rc.lisp |
$ echo "" | sbcl --script rc.lisp |
||
stdin is not a terminal</pre> |
stdin is not a terminal</pre> |
||
=={{header|Crystal}}== |
|||
<lang ruby>File.new("testfile").tty? #=> false |
|||
File.new("/dev/tty").tty? #=> true</lang> |
|||
=={{header|D}}== |
=={{header|D}}== |