this post was submitted on 24 Sep 2025
1278 points (98.1% liked)
Programmer Humor
26624 readers
1076 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can use
||
between two commands as well. If the first command returns exit code != 0, the second command will run.I.e.
which ansible || pip install ansible
.Or && for if you only want the second command to run if the first command succeeded.