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
PHP - mail function does NOT work on Window account. Need Help Sending Mail Using SMTP
Looking For the Coolest Flash Gallery Viewer
Best way to copy SQL record using VB6
What is the equivalent of html anchor control's name attribute in asp.net Hyperlink control
which is faster of the two...
Problem passing child data to parent window
Thread pool member on TCPIP ?
Coldfusion and redirecting question
A parsing error
Open another form based on selected record in a continuous form