Again thanks a lot... it's working fine, but today I found out that some blocks are repeated!!
This script is meant to filter the information of a web page, and it's run once every 24 hours Can you have a look at the beginning of my file, Gerald? I think it's correct and still I am getting the last block of today repeated (in /tmp/arXiV_2.txt): -------------------------------------------------------------------------------------------------------------------- :!links -dump http://lanl.arxiv.org/list/astro-ph/new > /tmp/arXiV_1.txt :e /tmp/arXiV_1.txt :1,/received/d :$?^\s*Cross-listings?,$d :%s/\[abs, ps, pdf, other\] ://g :%s/\[abs, pdf\] ://g :%s/Title:/\<b\>T\ítol\/<i>Title<\/i>:\<\/b\>/g :%s/Authors:/\<b\>Autors\/<i>Authors<\/i>:\<\/b\>/g :%s/Comments:/\<b\>Comentaris\/<i>Comments<\/i>:\<\/b\>/g :let @a='' :g/hole\|relativistic\c|gravitational\c|waves\c|compact\c|n-body\c|grape\c|coalescence\c|LISA\|black\c|supermassive\c|intermediate\c/?^\s*astro-ph?,/^\s*astro-ph/-y A :%d :put a :1d :%s!^\s*astro-ph/\(\d\+\)!<a href="http://xxx.lanl.gov/pdf/astro-ph/\1">&</a> :%s/<a/ <a/g :%s/^./<br>/ :%s/^$/<br>/ :1s/<br>/<!-- comenca -->/ G :s/<br>/<!-- acaba -->/ :g/xxx\.lanl\.gov\|<!-- acaba -->/put!='#end#' :%s/^\(.*xxx\.lanl\.gov\_.\{-}\_^#end#\)\%(\n\1\)\+$/\1 :g/^#end#$/d :w! /tmp/arXiV_2.txt --------------------------------------------------------------------------------------------------------------------