~snappy-dev/snapcraft/core

27 by Michael Terry
switch readline to pipeline example, with surrounding c code
1
#include <pipeline.h>
28 by Michael Terry
Add make-project; support after: key; improve libpipeline example
2
#include <stdio.h>
27 by Michael Terry
switch readline to pipeline example, with surrounding c code
3
4
int main()
5
{
6
    pipeline *p;
7
    int status;
8
29 by Michael Terry
fix print of our pipeline test
9
    printf("running ls | grep s | grep t\n");
28 by Michael Terry
Add make-project; support after: key; improve libpipeline example
10
27 by Michael Terry
switch readline to pipeline example, with surrounding c code
11
    p = pipeline_new ();
12
    pipeline_command_args (p, "ls", NULL);
13
    pipeline_command_args (p, "grep", "s", NULL);
14
    pipeline_command_args (p, "grep", "t", NULL);
15
    status = pipeline_run (p);
16
17
    return status;
18
}