Re:Create Your Own Shell in Python
by munyari on Wednesday July 06, 2016 @04:03PM
(#12045482)
How does one implement logical connectives? (&&, ||)
[ Parent
| on HN ]
There are many ways that one might; perhaps the simplest might be to just define them as a builtin to your shell that checks the exit code of the left-hand command, and executes or doesn't the right-hand command accordingly.