Microsoft
Software
Hardware
Network
Question : Sed help
Hello,
I have got a file pattern like below:
#cat test
PermitRootLogin yes
#PermitRootLogin yes
PermitRootLogin no # some text
PermitRootLogin some text
##PermitRootLogin yes
I need a Sed command that will replace all the lines "PermitRootLogin" entries into following format:
PermitRootLogin no
PermitRootLogin no
PermitRootLogin no
PermitRootLogin no
PermitRootLogin no
I tried with the following but it not working fully,
sed 's/PermitRootLogin.*$/Perm
itRootLogi
n no/' test
Please let me know. Thanks !
Answer : Sed help
sed -e 's/^.*PermitRootLogin.*$/P
ermitRootL
ogin\ no/g' file > file.new
Random Solutions
Outlook Auto-accept does not work for Outlook 2010 meeting requests: Iin Exchange 2003
Any faster method in vb.net to convert string with left and Ucase
Add select to recordset
How do I in code behind scroll to an object
Exceute .ASP file using Javascript/Ajax
how to add a column checkbox to Telerik RadGrid to select/deselect all the checkboxes from each item?
Simple query question/request
delphi support jpeg 2000 images
calling package/proc
publishing Terminal Server in ISA 2006