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
The time on my Cisco Call Manager Express Router is wrong.
TS RemoteApp (Outlook 2007) traffic usage
Unable to apply server email disclaimer.
Number of manual page breaks per section
JSF/Hibernate: Custom Validators
recognize hard drive size
call code behind method from javascript
Windows Fax and Scan
How do I get a number format in Excel 2007 that accepts a "0" at the beginning of the number string?
Office SharePoint Server - The SSP Timer Job Distribution List Import Job was not run (error 6641).