Hi @Inderpreet, I think I did everything correctly and still it got failed. Request you to review my task once and let me know the details.
You’re quite welcome, Swaroop, that is correct.
Please note that you were supposed to delete the entire line containing the word copyright
but you only deleted the word itself, hence your answer was marked as failed.
Please notice the spaces before and after copyright
(sed ‘/ copyright /d’) in your command that made it not to match the pattern hence changes were not made correctly.
Hi @Inderpreet. No worries, I’m happy to help improve the platform. Thanks for taking care of this.
Thank you Inderpreet. I should have been little more wary.
Have a great day ahead!
Swaroop
Completed the Task with below
ssh clint@stbkp01
sudo su -
ls -al( to check if Nautilus.xml file is present in root)
cat /root/nautilus.xml (to view how many instances of old String value are there)
sed -i ‘s/String/Submarine/g’ /root/nautilus.xml
cat /root/nautilus.xml (all instances are changed to new string )
task is completed.
Thanks Peter. Those are valuable inputs learned something today. I was unable to switch to root figured it out after multiple failures.
Hi I have the same problem do that like video and check them by cat command but in conform faild!!!
its fake video don’t follow it try your own. google it you will find the solution.
I believe I did the right things but the task failed saying the statement below:
Make sure to replace all the occurrences of ‘or’ to ‘them’ in ‘/home/BSD_REPLACE.txt’ on stapp01
Hey
I facing the same issue myself
please assist
Hey guys,
follow this
sudo sed -i ‘s/String/Software/g’ /home/BSD.txt
(old text/new text)
Hi,
so this is where we’re going wrong:
in the task one it says delete “all lines” containing the word software, but we’re trying to delete just the word, so try this:
sed ‘/software/d’ BSD.txt > BSD_DELETE.txt
replace the word software with the word asked in the task
I have similar issue , can someone review and advise.
[root@stapp03 home]# sed -i ‘/copyright/d’ /home/BSD.txt > /home/BSD_DELETE.txt
[root@stapp03 home]# sed -i ‘s/and/their/g’ /home/BSD.txt > /home/BSD_REPLACE.txt
[root@stapp03 home]#
Thank you already.
Just replace -i with -e.
The rest is fine.
The command doesn’t include to print the results to a new file.