On Mon, Feb 14, 2000 at 10:48:19AM -0500, Danny Cox wrote:
>
> previous ALE meeting asked if there was a way to run script(1) without the
> line buffering, short of recompiling it. Well, I stumbled across
> this expect script that emulates script(1), and doesn't buffer! It sends
> chars as soon as typed.
>
>         Here it is:
>
>         #!/usr/bin/expect
>         spawn $env(SHELL)        # starts a new shell
>         log_file -noappend [lindex $argv 0]
>         interact
Thanks, that works perfectly, and it's a convenient size to cut&paste.
Background for those not at the meeting: On some other unixes, you can
run "script /dev/pts/30" to output your session onto that other pty. If
you and a user are both needing to look at the output of the same
commands, and you're both running compatible terminal emulation, then
that script command is a very convenient and simple way to have two
people see what one person is doing.
The "script" command is nice because it doesn't require anyone to
download, much less compile, any other program, and it tends to work no
matter how broken the system you're trying to repair is, (as long as
it's working enough for the logins to function, obviously.)
Unfortunately, when using the script command on the linux distributions
I've tested, the other party sees the commandline editing being buffered
line-by-line, making those important last-second, "no, it's the *other*
file you want to delete" comments more likely to happen too late.
This script is a convenient solution.
(What's embarassing here is that I was so tunnel-visioned into
figuring out how to make script work the same way on linux and
not require any new programs be loaded onto the system that probably
isn't working correctly in the first place, that I never considered
cutting&pasting a short script instead. )
Thanks,
-Mark Shewmaker
">mark@primefactor.com
>         Hope this helps, and if someone else knows who the person was
> asking the question, would you make sure he notices this email?
This brings up another point--maybe we could use name tags at the
ale meetings. There are a lot of people I talk with there whose
name I don't know. I for one would find name tags helpful.
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.