gforth
[Top][All Lists]
Advanced

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

Re: How to get stdin that is passed to Gforth from command line in Debia


From: Philip Smith
Subject: Re: How to get stdin that is passed to Gforth from command line in Debian for example?
Date: Tue, 25 Feb 2020 19:35:26 -0700

Very Nice... well to be honest i did try that at some point but i also have
been working on several things at the same time.   I bet i thought that
slurp-fid test i did failed for some other reason and i did not identify it.
Very much appreciated.  It seems so obvious now!...
PKS


On Tue, Feb 25, 2020 at 4:58 PM Bernd Paysan <address@hidden> wrote:

> Am Mittwoch, 26. Februar 2020, 00:41:14 CET schrieb Philip Smith:
> > I need help with how to get the stdin from command line like the
> following:
> >
> >  $  echo "hello world testing" | ./test.fs -e "(get-ext-stdin$)"
>
> Just use stdin as file descriptor, and slurp-fid to read all from that
> file.
> Example:
>
> echo "This is a test" | gforth -e "stdin slurp-fid type bye"
>
> So your (get-ext-stdin$) is
>
> : (get-ext-stdin$)  stdin slurp-fid ;
>
> --
> Bernd Paysan
> "If you want it done right, you have to do it yourself"
> net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
> https://net2o.de/
>


-- 
                \|||/
-----0oo---( o o )---oo0------
                (_)
>From the hand of PKS


reply via email to

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