Anonymous user
Check input device is a terminal: Difference between revisions
Check input device is a terminal (view source)
Revision as of 20:13, 19 September 2014
, 9 years agoAdded Crystal version
No edit summary |
(Added Crystal version) |
||
Line 64:
$ echo "" | sbcl --script rc.lisp
stdin is not a terminal</pre>
=={{header|Crystal}}==
<lang ruby>File.new("testfile").tty? #=> false
File.new("/dev/tty").tty? #=> true</lang>
=={{header|D}}==
|