Re: Using terminal output as input



On Tue, May 19, 2009 at 10:02:54AM -0500, Boyd Stephen Smith Jr. wrote:

AIUI, screen is quite scriptable and should be capable of sending output to
the process(es) attached to it. This would allow you to write "screen
scripts" that used the shell for what it is good at and used screen for what
it is good at.

And as you mentioned scripts, I'll mention script(1) again.

tzafrir@sweetmorn:~$ script /tmp/log
Script started, file is /tmp/log
tzafrir@sweetmorn:~$ which mozilla
/usr/bin/mozilla
tzafrir@sweetmorn:~$ exit
Script done, file is /tmp/log
tzafrir@sweetmorn:~$ cat /tmp/log
Script started on IDT 16:35:21 2009 מאי 20 ד'
tzafrir@sweetmorn:~$ which mozilla
/usr/bin/mozilla
tzafrir@sweetmorn:~$ exit

Script done on IDT 16:35:32 2009 מאי 20 ד'

--
Tzafrir Cohen | tzafrir@xxxxxxxxxx | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@xxxxxxxxxxxxx | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Strange 224.0.0.251 address being accessed on bootup
    ... networking stuff and you don't want to play with that. ... To disable the actual script, put an exit -1 in after the shebang before ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: new computer maybe wrong dvd burner
    ... Script started on Fri 25 Apr 2008 04:03:35 AM EDT ... kernel messages are created. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • new computer maybe wrong dvd burner
    ... Later I'll get some help changing booting order in cmos to pick this drive up. ... Script started on Fri 25 Apr 2008 04:03:35 AM EDT ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: Remove duplicate files [POSIX script]
    ... I added in a hurry before I posted the script. ... In addition to the algorithmic complexity one should also note that ...
    (comp.unix.shell)
  • Re: Changing a users password non-interactively?
    ... You need expect and a setpass.expect script which ill add ... exit with a nasty warning. ... # Be careful of the COMMAND and UNDOCMD - they are dependant on your ...
    (comp.unix.aix)