Use current TTY in Linux

Use current TTY in Linux

Find current TTY

tty

Duplicate output when using pipe

echo testing message | tee `tty` | more

Note: Some cases, tty might not reply correctly when sub shell created in command line. In this case, better save tty in variable before execute into sub shell.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


The reCAPTCHA verification period has expired. Please reload the page.