if [ -t 1 ]; then ...
SEE ALSO: isatty(3)
2007-09-03
bash: 如何判断 stdout 是否是个 terminal
Posted by
Display Name
-
9:26 AM
Labels: Shell/Scripting
Subscribe to:
Post Comments (Atom)
Sometimes I wonder about my life. I lead a small life. Well, valuable but small. And sometimes I wonder, do I do it because I like it, or because I haven't been brave? So much of what I see reminds me of something I read in a book, when shouldn't it be the other way around? I don't really want an answer. I just want to send this cosmic question out into the void. So good night, dear void.
if [ -t 1 ]; then ...
SEE ALSO: isatty(3)
Posted by
Display Name
-
9:26 AM
Labels: Shell/Scripting
No comments:
Post a Comment