Re: Newbie question

2017-04-16 Thread Vincent
Great! Thanks! This is now my main shell! On Sun, Apr 16, 2017 at 10:37 AM, Laurent Bercot wrote: >> What I am trying to write, is a minimal interpreter read-eval loop, >> which gets its $INPUT from /dev/tty. > > > How about this? > > redirfd -r 0 /dev/tty > forstdin

Re: Newbie question

2017-04-16 Thread Laurent Bercot
What I am trying to write, is a minimal interpreter read-eval loop, which gets its $INPUT from /dev/tty. How about this? redirfd -r 0 /dev/tty forstdin -d"\n" LINE importas -u LINE LINE execlineb -c $LINE -- Laurent

Re: Newbie question

2017-04-16 Thread Vincent
Maybe this is more a shell question. But with the exception of http://wiki.tcl.tk/15088 I could not find barely any examples: This works: #!/bin/execlineb define INPUT "ls" execlineb -c $INPUT What I am trying to write, is a minimal interpreter read-eval loop, which gets its $INPUT from

Re: Newbie question

2017-04-16 Thread Vincent
Thank you! Didn't notice withstdinas. On Sun, Apr 16, 2017 at 1:47 AM, Laurent Bercot wrote: >> because read is builtin to sh. >> Is there a solution as simple as the above? > > > Try the "forstdin" or "withstdinas" commands. > > -- > Laurent >

Re: Newbie question

2017-04-15 Thread Laurent Bercot
because read is builtin to sh. Is there a solution as simple as the above? Try the "forstdin" or "withstdinas" commands. -- Laurent

Newbie question

2017-04-15 Thread Vincent
How would you translate this simple eval loop to execlineb? #!/bin/sh read input