dimanche 18 mars 2018

check for installed application using bash file if then in Ubuntu

I am writing a bash file to install applications using apt-get in Ubuntu but I don't know how to do a check if the applications are installed.

The code I'm thinking of is something like this:

string app_list = {list of applications}

for i in app_list {
    if i exists = False {
        apt-get install i    
    }
    else {}
}

Aucun commentaire:

Enregistrer un commentaire