News for hackers. Stuff that matters.
Re:Create Your Own Shell in Python by munyari on Wednesday July 06, 2016 @04:03PM (#12045482)
How does one implement logical connectives? (&&, ||)
Re:Create Your Own Shell in Python by OJFord on Wednesday July 06, 2016 @05:38PM (#12046058)
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.