• JasonDJ@lemmy.zip
    link
    fedilink
    arrow-up
    4
    ·
    10 days ago

    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.