Re: PLEAC last part finished (File Access)
On Sat, Jun 16, 2018 at 03:56:15PM +0200, Arie van Wingerden wrote: > Or do you mean e.g. something line: > ./script mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PLEAC last part finished (File Access)
Hi Arie, > please have a look. > I am still not very sure about the read STDIN until EOF. Yes, the examples are a bit meaningless as they are now. > I created a small script, but when is EOF of STDIN really signalled??? Concerning stdinread: You need an (in NIL ..), because when the script runs, the *current* input channel is still the script itself (this is the nature of a Lisp interpreter). So if you write #!/usr/bin/picolisp /usr/lib/picolisp/lib.l (in NIL (println "Type a few lines and end with ctrl+d") (setq Var (in NIL (till NIL T))) (prinl Var) (println "Program is finished!") ) (bye) and then do $ { echo abc; echo def; } | ./stdinread "Type a few lines and end with ctrl+d" abc def "Program is finished!" Note that starting ./stdinread and then typing works but will not print any output, because ^D terminates the interpreter. The other examples are fine, aren't they? ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PLEAC last part finished (File Access)
OK. I changed that to an example using redirection of STDIN to a file. 2018-06-16 15:56 GMT+02:00 Arie van Wingerden : > Or do you mean e.g. something line: > ./script ?? > > Thx. > > 2018-06-16 15:38 GMT+02:00 Arie van Wingerden : > >> Hi Alex, >> >> please have a look. >> >> I am still not very sure about the read STDIN until EOF. >> >> I created a small script, but when is EOF of STDIN really signalled??? >> >> Maybe a small example? >> >> Thx, >>Arie >> > >
Re: PLEAC last part finished (File Access)
Or do you mean e.g. something line: ./script : > Hi Alex, > > please have a look. > > I am still not very sure about the read STDIN until EOF. > > I created a small script, but when is EOF of STDIN really signalled??? > > Maybe a small example? > > Thx, >Arie >