783
you are viewing a single comment's thread
view the rest of the comments
[-] psud@aussie.zone 5 points 2 months ago

With all those connected with & won't it skip the rest after the first failure? Or does 'no such program' or 'you don't have permission' not produce an error?

[-] Kimplul@programming.dev 10 points 2 months ago

In bash, & just starts the program in the background, so all of the commands are run in parallel. You're probably thinking of &&, which runs the command on its left, checks its return code, and then decides whether run the command on the right.

Although, in this case there are no 'commands on the right' since all the commands are on separate lines. You'd need to backslash the commands together, something like

pip install "$1" && \
easy_install "$1" && \
...
[-] psud@aussie.zone 6 points 2 months ago

I saw it as wrapped, so couldn't dismiss the option that all were on a single logical line. But you're right, I was thinking of &&

[-] Tja@programming.dev 8 points 2 months ago

That would be &&.

A single & will run them in parallel.

[-] psud@aussie.zone 3 points 2 months ago
[-] katze@lemmy.4d2.org 0 points 2 months ago

Yes, it should have been a ; instead.

this post was submitted on 04 Aug 2026
783 points (99.0% liked)

Programmer Humor

33844 readers
800 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

founded 3 years ago
MODERATORS