[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script para arreglo de buzones corruptos



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Juanillo.....
On Sunday 25 May 2003 17:17, Juanillo wrote:
> Hola
>
> Muchas gracias por tu ayuda. aunque prefiero no tener que hacerlo en C.
> Al final con el sed no tengo que mover grandes ficheros, solo al pegarlos
> al final.

Y eso que sólo es de 50 Mb, yo no me complicaría la vida y aprovecharía la 
ocasión para migrar a Maildir, casi todos los clientes ya lo implementan de 
serie, y dejaría al script mbox2maildir ( suelen estar en perl y los hay de 
todos los sabores, uno en qmail por ejemplo ) el trabajo, si el daño no es 
muy grande recuperas tus buzones y los tienes en un formato mucho más 
tolerante a fallos

respecto a tratar texto en ficheros grandes..... como diría manolito en perl 
son 5 minutos... :))


en grep lo que quieres hacer seguramente te salga con grep -m...

- -----------------------------------------------------------------------------------
 -m NUM, --max-count=NUM
              Stop reading a file after NUM matching lines.  If the input is 
standard input from
              a regular file, and NUM matching lines are output, grep ensures 
that the  standard
              input  is  positioned to just after the last matching line 
before exiting, regard-
              less of the presence of trailing context lines.  This enables a 
calling process to
              resume  a search.  When grep stops after NUM matching lines, it 
outputs any trail-
              ing context lines.  When the -c or --count option is also used, 
grep does not out-
              put  a count greater than NUM.  When the -v or --invert-match 
option is also used,
              grep stops after outputting NUM non-matching lines.
- -------------------------------------------------------------------------------------------

grep -q es el quiet mode con lo que funcionar funciona sólo que nunca te 
sacara nada por la salida standard 

- ---------------------------------------------------------------------------------------
- -q, --quiet, --silent
              Quiet;  do not write anything to standard output.  Exit 
immediately with zero sta-
              tus if any match is found, even if an error was detected.   Also  
see  the  -s  or
              --no-messages option.
- -----------------------------------------------------------------------------------------

un saludo y a cuidarse...
Victor



- -- 
Lo que la naturaleza no da....
O'reilly & Associates no lo prestan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+0dnxEzqHF8R72ekRApB9AKCkB5IlwlEnvF3d0aMi6w1qiXtkVQCfSXWz
i/TaWWpVr6K4TeK4ksoyRc8=
=boY+
-----END PGP SIGNATURE-----



Reply to: