Mouse <[email protected]> writes: >>> I have since tried this on a work Ubuntu machine, and it "works". >>> That is, "cat | script -c sh | cat" (-u not necessary, turns out) >>> gives an interactive shell that accepts commands and returns results >>> like any other shell. >> That's not really works, in that the shell run by script has >> magically found the tty instead of script(1)'s stdin. > > Not according to tty(1). Mouchine is the work Linux machine: > > [Mouchine] 18> tty > /dev/pts/6 > [Mouchine] 19> cat | script -c sh | cat > Script started, output log file is 'typescript'. > $ tty > tty > /dev/pts/11 > $ exit > exit > Script done. > [Mouchine] 20>
Sorry, I misread. I thought you were giving script some other stdin. In my case it's /dev/null.
