Linux String Substitute (sed) (linux level2)

  • ‘software’ pattern not deleted correctly in ‘/home/BSD_DELETE.txt’ on App Server 1

Multiple try and i can’t validate this tasks

i test multiple thing like

grep -w ‘software’ > /home/BSD_DELETE.txt

(with code or software etc word asked when i have multiple tries)

sed -n ‘/<code>/w /home/BSD_DELETE.txt’ /home/BSD.txt && sed -i ‘/<code>/d’ /home/BSD.txt

always wrong… ??

i found solution an another posts on this forum

I think , the statement have to get me in trouble.

Statement should have a tips : (contents in BSD_DELETE.txt and BSD_REPLACE.txt must have an structure as (like it ). All contents of BSD.txt and miss the lines deleted… because i thought i wll be save only the deleted lines on BSD_DELETE.txt its confuse.;

sed “/software/Id” /home/BSD.txt > /home/BSD_DELETE.txt

sed ‘s/<the>/is/g’ /home/BSD.txt > /home/BSD_REPLACE.txt