can I feed bash commands simulating a user typing?

From: Eric Taylor (et1_at_rocketship1.com)
Date: 07/11/05


Date: Mon, 11 Jul 2005 08:23:27 -0700

I would like to write a little gui program that one would
invoke from bash, which would then feed commands to
this or another bash window. I need to be able to invoke
functions and set environment variables in this bash process.

Is there an easy way to do this? I can write the gui in tcl/tk
and that's the easy part, it's how to feed bash that I'm stuck on.

Ideally, the user could run my gui program and see results in
the same bash window, but a second choice would be to
run the program from one bash prompt and have another
bash window open plus a gui window.

thanks
eric



Relevant Pages

  • Re: Is Maxima available for OS X?
    ... > in the initial bash window instead of a separate xterm window) ... > I prefer the launcher method for xmaxima but this trick will be ... > pretty useful for other X11 applications (bash provides much better ...
    (sci.math.symbolic)
  • Re: How to add dir to path
    ... amp@think:~$ grep Hello .bash* ... amp@think:~$ exit ... It works on my system as well, for every new bash WINDOW I open, ... a new session, only .bashrc is read. ...
    (Debian-User)