How do I insert a line/value after a particular line, in file with sed
Hello
I need to run a command in a shell script to insert a line in a file, after it finds certain line.
To add the line 'user = mysql'
after the line [mysqld]
in file /etc/my.cnf
How can that be done ?
I am thinking of using sed to accomplish it.
An example is appreciated.
Cheers Glenn
|