A pipeline is a sequence of one or more commands separated by one of the control operators | or |&. The format for a pipeline is: This is the only

izabera / bash_quiz.md Secret

submited by
Style Pass
2024-10-05 08:00:02

A pipeline is a sequence of one or more commands separated by one of the control operators | or |&. The format for a pipeline is:

This is the only place in which ! can appear. It never prefixes commands, it prefixes pipelines. As a consequence, this is fine:

C. Prints 1 because ! is a flag on the pipeline and this is parsed as multiple nested pipelines and you're getting the exit code of the outermost one.

It prints 33 in bash. This is an extension to posix because that syntax is not defined in a posix shell. Collapsing the two is a very sane and useful extension. I'm sure this is exactly what you expected.

Leave a Comment
Related Posts