Check input device is a terminal: Difference between revisions

Added UNIX Shell solution
(Racket version)
(Added UNIX Shell solution)
Line 124:
Input doesn't come from tty.
</pre>
 
=={{header|UNIX Shell}}==
<lang sh>#!/bin/sh
 
if [ -t 0 ]
then
echo "Input is a terminal"
else
echo "Input is NOT a terminal"
fi</lang>
 
{{omit from|GUISS}}