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

Concept: Pipelines and Command Lists #714

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

glennj
Copy link
Contributor

@glennj glennj commented Nov 25, 2024

No description provided.

@glennj glennj marked this pull request as draft November 25, 2024 23:32
@glennj glennj requested a review from a team November 25, 2024 23:37
concepts/pipelines/introduction.md Outdated Show resolved Hide resolved
```

The pipe symbol (`|`) connects the output of one command to the input of another.
`cut` reads the output of `cat`, and `sort` reads the output of `cut`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to take a step back and mention how many commands read from STDIN (and/or a file) and write to STDOUT? Introduce STDIN/STDOUT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I'll do a "sneak preview" of I/O, with a promise of more to come in a later concept.

concepts/pipelines/introduction.md Outdated Show resolved Hide resolved
concepts/pipelines/introduction.md Outdated Show resolved Hide resolved
concepts/pipelines/introduction.md Show resolved Hide resolved
concepts/pipelines/introduction.md Outdated Show resolved Hide resolved
exit 1
}

[[ $x -eq 5 ]] || die "x must be equal to 5"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you're using [[ and not (( for numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arithmetic is the next one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. But you're still using [[ for numbers, which I usually tell people to avoid. Could this be a string operation instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes of course. It's just example code here, I do a user/password thingy

concepts/pipelines/introduction.md Outdated Show resolved Hide resolved
concepts/pipelines/introduction.md Outdated Show resolved Hide resolved
concepts/pipelines/introduction.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants