this is my file.txt content. Here I'm trying to search pattern text: 'About' and remove items:[{ line with the command as below:
file.txt:
items: [{
text: 'About',
handler: function() { TP.aboutWindow() }
Command:
sed -n -i -E '/text\: \'About\'/{n; $p; x; d}; x; 1!p; ${x;p;}' file.txt
but it seems to be not working. Is there any way to make it work to remove line above pattern?
Thanks in advance.