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
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
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
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
>
because read is builtin to sh.
Is there a solution as simple as the above?
Try the "forstdin" or "withstdinas" commands.
--
Laurent
How would you translate this simple eval loop to execlineb?
#!/bin/sh
read input