{
  "pipeline": {
    "name": "filter"
  },
  "transform": {
    "cmd": [ "sh" ],
    "stdin": [
        "for fruit in apple orange banana; do",
        "   grep -h $fruit /pfs/data/* | awk '{print $2}' >>/pfs/out/$fruit",
        "done"
    ]
  },
  "enable_stats": true,
  "parallelism_spec": {
    "constant": 1
  },
  "inputs": [
    {
      "name": "data",
      "repo": { "name": "data" },
      "branch": "master",
      "glob": "/*"
    }
  ]
}
{
  "pipeline": {
    "name": "sum"
  },
  "transform": {
    "cmd": [ "sh" ],
    "stdin": [
        "for fruit in apple orange banana; do",
        "   [[ -e /pfs/filter/$fruit ]] || continue",
        "   cat /pfs/filter/$fruit | awk '{s+=$1} END {print s}' >/pfs/out/$fruit",
        "done"
    ]
  },
  "parallelism_spec": {
    "constant": 1
  },
  "inputs": [
    {
      "name": "filter",
      "repo": { "name": "filter" },
      "branch": "master",
      "glob": "/*"
    }
  ]
}

{
  "pipeline": {
    "name": "filter"
  },
  "transform": {
    "cmd": [ "sh" ],
    "stdin": [
        "for fruit in apple orange banana; do",
        "   grep -h $fruit /pfs/data/* | awk '{print $2}' >>/pfs/out/$fruit",
        "done"
    ]
  },
  "parallelism_spec": {
    "constant": 1
  },
  "inputs": [
    {
      "name": "data",
      "repo": { "name": "data" },
      "branch": "master",
      "glob": "/*"
    }
  ]
}
{
  "pipeline": {
    "name": "sum"
  },
  "transform": {
    "cmd": [ "sh" ],
    "stdin": [
        "for fruit in apple orange banana; do",
        "   [[ -e /pfs/filter/$fruit ]] || continue",
        "   cat /pfs/filter/$fruit | awk '{s+=$1} END {print s}' >/pfs/out/$fruit",
        "done"
    ]
  },
  "parallelism_spec": {
    "constant": 1
  },
  "inputs": [
    {
      "name": "filter",
      "repo": { "name": "filter" },
      "branch": "master",
      "glob": "/*"
    }
  ]
}

Revert fruitstand - dont use stats
Revert fruitstand - dont use stats
