2 Kasım 2017 Perşembe

test komutu

-t seçeneği
Açıklaması şöyle. isatty() çağrısının aynısını yapar
-t file_descriptor
True if file descriptor number file_descriptor is open and is associated with a terminal. False if file_descriptor is not a valid file descriptor number, or if file descriptor number file_descriptor is not open, or if it is open but is not associated with a terminal.
Standard Input için şöyle yaparız.
test -t 0
Diğer inputlar için şöyle yaparız.
test -t 0 -a -t 1 -a -t 2
bash içinde şöyle yaparız.
if [ -t 0 ] ; then ...

Hiç yorum yok:

Yorum Gönder