synthespian ([EMAIL PROTECTED]) wrote: > Em Seg, 2002-10-14 às 08:20, Santiago Vila escreveu: > > José Tormo escribió: > > > Necesito, desde la linea de comandos, borrar una linea de un archivo que > > > empieza siempre > > > con la fecha y hora Ej. "Oct 14" > > > > No entiendo, ¿quieres decir que has probado ya grep -v "^Oct 14" > > y no te funciona? > > Es que grep -v selecciona todo el archivo *menos* la linea especificada > con -v. En este sentido, no borra nada. > Interessante solucion, aunque uno necessite borrar el arquivo original. > > Henry > --
Simplemente redirecciona la salida de grep al mismo archivo, por ejemplo: grep -v "tu_expresion" archivo.txt > archivo.txt Saludos! > > > (defun foo-l (byte) > (cond ((null byte) nil) > ((atom byte) (format t "~% foo~C"#\l)))) > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > Mauricio Téllez Jiménez Facultad de Informática UV [EMAIL PROTECTED] Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning. Richard Cook