Skip to content

Support for piping together two or more commands #847

@amigalemming

Description

@amigalemming

I guess this has been asked for a thousand times, but I cannot find it in the Docs or FAQ.

I want to do this the proper way:

do (Stdout stream) <- cmd "producer"
   cmd_ "consumer" (StdinBS stream)

However, it will not work, because consumer is only started after producer finished. I would need to add fork:

do (Stdout stream) <- fork $ cmd "producer"
   cmd_ "consumer" (StdinBS stream)

But we are in the Action monad, thus no fork available. :-(

If a pipe connection is currently not possible, then please implement it. If it is already possible, please document it. At least, this ticket might be an anchor for other ones looking for a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions