LeviDaily
asked on
Debian SED command, Multiple line search and replace
I have a config file that I am trying to edit with sed. Currently I am searching one line and replacing and it is working, but I would like to search and replace multiple lines and I am not sure on the correct command.
sudo sed -e "s/anonymous_enable=YES/an onymous_en able=NO/g" /etc/vsftpdbackup.conf
*This above works great, but I have another line below that I need to replace.
The config file looks like this:
anonymous_enable=YES
local_enable=NO **needs to be yes
write_enable=YES **need to comment this out with #
sudo sed -e "s/anonymous_enable=YES/an
*This above works great, but I have another line below that I need to replace.
The config file looks like this:
anonymous_enable=YES
local_enable=NO **needs to be yes
write_enable=YES **need to comment this out with #
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER