Paramètres utilisables pour les fichiers permissions remove preserve warning no_overwrite Commandes pour pre and post ajouter une ligne dans un fichier si elle n'existe pas déjà (voir https://stackoverflow.com/questions/3557037/appending-a-line-to-a-file-only-if-it-does-not-already-exist) LINE='mytext'; FILE='myfile'; grep -qF -- "$LINE" "$FILE" || echo "$LINE" >> "$FILE" If it is necessary to match the whole line, add x to grep parameters -q be quiet -x match the whole line -F pattern is a plain string It can be done with sed but the syntax is highly complex.