Jump to content

Check output device is a terminal: Difference between revisions

Added section on PHP
(Added Kotlin)
(Added section on PHP)
Line 240:
False</pre>
 
=={{header|PHP}}==
<lang php>
if(posix_isatty('/dev/stdout')) {
echo "The output device is a terminal".PHP_EOL;
} else {
echo "The output device is NOT a terminal".PHP_EOL;
}
</lang>
=={{header|Python}}==
Pretty much the same as [[Check input device is a terminal#Python]].
Cookies help us deliver our services. By using our services, you agree to our use of cookies.