Author Topic: sed command problem [SOLVED]  (Read 2089 times)

ikeeki

  • Guest
sed command problem [SOLVED]
« on: February 14, 2014, 11:52:44 am »
Hi¡¡

If I have

Code: [Select]
sed -i 's/#autologin=linaro/autologin=linaro/g' /etc/lxdm/default.conf

but I need the entire sentence wich contents "#autologin=linaro" to be replaced (and not only the string "#autologin=linaro") ... what would be the most simple and transparent way for doing that?


Thanks.

Edit:

sed -i "3c\autologin=linaro" default.conf

It has to be in third sentence though, but no matter as soon as no one messes to much with files.


« Last Edit: February 14, 2014, 08:09:53 pm by ikeeki »