[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian-user-digest Digest V2005 #865



On Apr 4, 2005 12:03 PM, Scott MacCallum <scott.maccallum@gmail.com> wrote:
> The reason why I would like to have 'ed' put into the background via a
> SHELL script is because I am working on a program called EULUIE (no
> release yet) that is a user interface that sits on top of BASH, and I
> need to be able to start 'ed' via a SHELL script and put 'ed' into the
> background via a SHELL script.

I guess my confusion comes from the fact that if you background ed,
you'll need to bring it back into the foreground to interact with it. 
I suppose this makes sense if you're occasionally modifying a file
that's growing, and you want to keep your place as you go.  From a
script, though, I'd generally use sed (or more likely perl).

> I am sure I will have to deal with similar issues regarding other
> interactive commands, so and help would be greatly appreciated!

I haven't used it much, but "expect" is designed to work with
interactive commands through scripts.  You might also try telling ed
that stdin is coming from some other filehandle than the keyboard, say
a file descriptor, a pipe, a regular file, or a FIFO (named pipe).

-- 
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh
http://mamarsh.blogspot.com



Reply to: