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
How do I accomplish load balancing in a shared hosting environment using multiple accounts?
Need excel formula
SQL Full Backups and Trans Backups
dcpromo Setup Wizard and AD replication
find gridview row value when checkbox is selected
External Drive Shows Wrong Drive Size
Error Opening VBScript Connection to MySQL DB
Forefront client monitoring - Windows 7
validate text box for integer
How do i change the settings on the privicy tab of IE8 with group policy?