-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
base: main
Are you sure you want to change the base?
Conversation
``` | ||
|
||
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`. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
exit 1 | ||
} | ||
|
||
[[ $x -eq 5 ]] || die "x must be equal to 5" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Co-authored-by: Isaac Good <[email protected]>
No description provided.