• Kimplul@programming.dev
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 days 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
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 days 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 &&