task:
There is some data on Nautilus App Server 2 in Stratos DC. Data needs to be altered in several of the files. On Nautilus App Server 2, alter the /home/BSD.txt file as per details given below:
a. Delete all lines containing word copyright and save results in /home/BSD_DELETE.txt file. (Please be aware of case sensitivity)
b. Replace all occurrence of word the to them and save results in /home/BSD_REPLACE.txt file.
Note: Let’s say you are asked to replace word to with from. In that case, make sure not to alter any words containing this string; for example upto, contributor etc.
My attempt to solve:
sed ‘/copyright/d’ ./BSD.txt - copy output and save in /home/BSD_DELETE.txt
sed ‘s/ the / them /g’ BSD.txt - copy output and save in /home/BSD_REPLACE.txt file
Can someone guide me what is wrong in my approach ?