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

Re: splitting mbox files



On 2003-11-16 14:16:40 +0000, ben wrote:
> pigeon posted this script just yesterday.
> 
> -------------------------------------------------
>  #!/bin/bash
>  IFS=$'\n'
>  i=0
>  BASENAME="split.mbox"
>  while read x; do
>      echo "$x" | grep '^From ' && i=$(( i + 1 ))
>      echo "$x" >> $BASENAME.$i
>  done
>  
> -------------------------------------------------

This won't work if you have a message containing a line starting
with "From ". No problem with Mutt.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Reply to: