KodeKloud Task
Question: Your Backup Server has a file named nautilus.xml in root folder. Replace all occurrence of "Sample" word by "Architecture" in nautilus.xml file
Solution: Use sed command to replace all occurrence of a word by another word
sudo sed -i 's/Sample/Architecture/g' nautilus.xml
Here s/ means substitute and g/ means global replace of all occurrence
Search previous word Sample by grep command to check
cat nautilus.xml | grep "Sample"
There should be no output
Search current word Architecture
cat nautilus.xml | grep "Architecture"
Output should be highlighted searched word
Check Server Screenshot:
0 comments:
Post a Comment