3 ms·
I'm really intrigued by this, because I like postfix notation and would love to be able to work more with in. Unfortunately, I only somewhat understand the exam
by saeranv 4y ago
I'm really intrigued by this, because I like postfix notation and would love to be able to work more with in. Unfortunately, I only somewhat understand the examples!
Question: Does the postfix notation allow you to chain commands together that in bash would have to be nested in brackets, like actual postfix math?
So for example, rather than the infix need of brackets to resolve ambiguity in this expression ((1 + 2) * 3) = 9, postfix just writes it like this: 1 2 + 3 * = 9.
- tomhrr 4y agoThanks, and yep, the postfix notation allows for chaining commands together without parentheses. For example: 1 2 +; 3 * (The semicolon is used to indicate that the previous string (token) is a function and should be executed. In some instances this is implicit, like when the last string (token) in a larger command (like the one above) maps to a function name, in which case it will be treated as a function call even when no semicolon appears after it.)