| christophe barbe on Wed, 9 Oct 2002 16:00:06 -0400 |
|
On Wed, Oct 09, 2002 at 12:17:07PM -0400, gabriel rosenkoetter wrote:
> On Tue, Oct 08, 2002 at 10:00:19PM -0400, christophe barbe wrote:
> > I am trying to tweak a shell to invoke a program (gettextize) without
> > providing a tty. Basically gettextize check if there is a tty (with
> > isatty) and if yes bother me (and others) with a useless "Press Enter
> > ..." message.
> >
> > Is there a way in bash or perl to do this?
>
> In Perl, yes. Either use Expect or Term::Read{Line,Key}.
>
> (No need to reinvent the wheel; it's already been generalized.)
Thanks gabe,
I was trying to close the tty but it is simplier to provide an ENTER
when expected. Expect does that easily.
I attach my very simple perl script just in case it can be useful for
someone else.
Christophe
> --
> gabriel rosenkoetter
> gr@eclipsed.net
--
Christophe Barbé <christophe.barbe@ufies.org>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E
There's no sense in being precise when you don't even know what you're
talking about. -- John von Neumann
Attachment:
gettextize.pl
|
|