Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native support for piping stdout to stdin between commands #2051

Open
zan-xhipe opened this issue Feb 9, 2025 · 0 comments
Open

Native support for piping stdout to stdin between commands #2051

zan-xhipe opened this issue Feb 9, 2025 · 0 comments
Labels
state: needs triage Waiting to be triaged by a maintainer.

Comments

@zan-xhipe
Copy link

Description

I often find myself writing pipelines with various unix tools and it would be great if Task had native support for this. Adds a new attribute for a task called pipe that is mutually exclusive with cmds. It accepts an array of commands, same as cmds but it pipes stdout of each to stdin of the next.

An alternative would be to have a pipe: true option to enable this behaviour on cmds.

It would look something like this.

tasks:
  prepare:
    pipe:
      - aws logs filter-log-events --log-group-name {{.LOG_GROUP}} --filter-pattern REPORT --query 'events[*].message'
      - jq -R '.[]'
      - grep .
      - grep -v 'INIT_REPORT'
      - tr -du "[:alpha:]"
      - cut -f2-5
      - tr '\t' ','
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Feb 9, 2025
@zan-xhipe zan-xhipe changed the title Add pipe as an alternative to cmds Native support for piping stdout to stdin between commands Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs triage Waiting to be triaged by a maintainer.
Projects
None yet
Development

No branches or pull requests

2 participants