unbuffer
, part of expect (sudo apt-get install expect-dev
on Ubuntu Lucid), can fool a program into thinking it’s connected to a TTY.
$ tty
/dev/pts/3
$ echo | tty
not a tty
$ echo | unbuffer tty
/dev/pts/11
More Related Contents:
- How to fix ‘sudo: no tty present and no askpass program specified’ error?
- Read values into a shell variable from a pipe
- Appending a line to a file only if it does not already exist
- curl: (6) Could not resolve host: google.com; Name or service not known
- How to open a new tab in GNOME Terminal from command line? [closed]
- Keep SSH session alive [closed]
- Using the “alternate screen” in a bash script
- How to use ‘cp’ command to exclude a specific directory?
- Pipe output to bash function
- How to write data to existing process’s STDIN from external process?
- Is it OK to use the same input file as output of a piped command?
- Pass a password to ssh in pure bash
- Linux command to list all available commands and aliases
- Example of using named pipes in Linux shell (Bash)
- Run text file as commands in Bash
- Prevent Gnome Terminal From Exiting After Execution [duplicate]
- How can I pipe initial input into process which will then be interactive?
- Clear a terminal screen for real [closed]
- Error “syntax error near unexpected token ‘(‘” in Bash script when selecting files
- pass stdout as file name for command line util?
- How can I copy the output of a command directly into my clipboard?
- node.js: cannot find module ‘request’
- Linux terminal input: reading user input from terminal truncating lines at 4095 character limit
- BASH copy all files except one
- /dev/random Extremely Slow?
- Why no output is shown when using grep twice?
- What is the purpose of the “-i” and “-t” options for the “docker exec” command?
- Why doesn’t “sort file1 > file1” work?
- Piping Text To An External Program Appends A Trailing Newline
- How can I get position of cursor in terminal?