Re: Shell pipe command with key pause
On Fri, Mar 26, 2004 at 11:30:35AM +0000, Alexis Huxley wrote:
> > I am wondering how to write simple shell script of "more" equivalent:
> >
> > 1. read from stdin
> > 2. write to stdout
> > 3. this loop is paused by key
> >
> > Of course, I know this can be dome by other means but when I was making
> > a bit more complicated shell script, I could not find an easy way to stop
> > the script when stdin is redirected. Is there any trick with exec
> > buildin?
>
> Check the comp.unix.shell FAQ and if that doesn't help you, try posting
> to comp.unix.shell newsgroup.
Good idea but I did not :-)
exec </dev/tty # This was it.
echo type
read x
echo "$x"
Reply to: