guile-user
[Top][All Lists]
Advanced

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

Re: pipelines


From: Marijn Schouten (hkBst)
Subject: Re: pipelines
Date: Mon, 30 Mar 2009 11:26:21 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andy Wingo wrote:
> Hi Marijn,
> 
> On Sat 28 Mar 2009 05:53, "Marijn Schouten (hkBst)" <address@hidden> writes:
> 
>> how would I construct a pipeline with guile? Currently my best attempt which
>> turns to nothing is:
>>
>> guile> (use-modules (ice-9 popen))
>> guile> (with-output-to-port (open-pipe "echo" OPEN_WRITE) (lambda ()
>> (with-input-from-port (open-pipe* OPEN_READ "echo" "Hello world") (lambda ()
>> (display (readline))))))
> 
> What do you mean by "pipeline"? Do you want to spawn off "echo foo |
> bar", or write data to "bar", or read data from "echo foo" ?
> 
> Andy

By pipeline I mean for example:

echo "Hello world" | cat | cat | cat | grep world | cat

I know how to create such pipelines that contain only a single pipe. My question
is about how to do it when there are many pipes.

Marijn

- --
Gods do not want you to think, lest they lose existence.
Religions do not want you to think, lest they lose power.

Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknQkD0ACgkQp/VmCx0OL2xg9QCfXpQiYE8NRW3jwKXwWT2/CMeG
4T0AnjjtydzaLNQb7qBp639Qd2UqHbR4
=lAkP
-----END PGP SIGNATURE-----




reply via email to

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