|
From: Bruce S. <bw...@ar...> - 2008-04-09 19:38:10
|
> I know you can do the addition with awk, maybe you can find the code > somewhere via google. I hate awk (not because it's difficult, but because of all the overhead, and quite often people make things a lot more complicated by using awk) In this case, it's easy to do with sed, i.e.: sed 's/^\[mysqld\]$/&\nuser\t\t= mysql/' /etc/my.cnf Doesn't that look much easier!?!? ;-) (only took me a couple minutes to come up with that! :) - BS |