insert a line in a file and backup it

Need to quicly insert a line ?

sed -i.backup -e's/#run_as_user.*/run_as_user=\"nexus\"/' /opt/nexus/bin/nexus.rc

Here an example for the nexus.rc file. Even if I find that a bit redundant with the systemd nexus.service file which said - again- User=nexus

But never mind ...

Afficher les commentaires