hi I am trying to edit a file through a shell script, but i am trying to edt it in a particular manner
here is a typical scenario i am facing
I have a file called script.txt withe following content :
*the owner of the* *trademark UNIX* *is The Open Group* *an industry standards* *consortium*.
Now i want to edit this file , but i want to edit this file in such a manner that after a given pattern i should be able to search an entire block-pattern , then delete that block-pattern .
for example suppose
after this given pattern */trademark UNIX/ * if exist then i want to delete the block-pattern /*is The Open Group*\n*an industry standards/*
??? any ideas
to append is pretty much simple with "sed " sed -i "/*trademark UNIX*/a*UNIX is great* \n*UNIX is awesome*" script.txt my file would then look something like this
*the owner of the* *trademark UNIX* *UNIX is great* *UNIX is awesome* *is The Open Group* *an industry standards* *consortium*
its is possible with sed and awk. can some one help me with my above query
Thanks