help-bash
[Top][All Lists]
Advanced

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

Re: how to assert user input to fifo to then read from it


From: Greg Wooledge
Subject: Re: how to assert user input to fifo to then read from it
Date: Thu, 25 Aug 2022 07:29:21 -0400

On Thu, Aug 25, 2022 at 11:36:11AM +0200, Alex fxmbsw7 Ratchev wrote:
> im doing some apt update cmds script
> in there i realized i need detached input for , when as dedicated auto
> updater used , a question appears , to answer this
> ( seeing by log then reacting to via printf to fifo , and checking then log
> further )
> 
> the script yet is attached
> the in question is line 20 , it does exec <"$fi"
> .. and my question is what previously to exec to put scripts stdin ( may
> not be tty .. ? ) into that fifo , then that the exec < that_fifo
> 
> understood halfways ?

If we remove the FIFO from the equation, it sounds like you want to
inject some scripted data into the terminal's input buffer.

There's this:

greg@remote:/home/greybot/factoids$ cat tiocsti ; echo
The TIOCSTI ioctl() command lets you insert input into a terminal driver's 
queue. "Simulate Terminal Input".

If you can do the injection in C, you can use that.

Otherwise, maybe you can do something with tmux or screen?  I don't know
those programs well enough.

Or if all else fails, there's always Expect.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]