Topic on Talk:Mailing lists

Jump to navigation Jump to search

Bash script for archiving lists...

DanielRenfro (talkcontribs)

Maybe I missed something, but I have yet to find a good way to search the archives of a list. When doing research I commonly want to read all the old messages and grep through them. So I wrote this little bash script:



if test -n "$( find . -maxdepth 1 -type f -name '*.txt' -print -quit )"
        echo 'Deleting old archives...'
        rm *.txt

for _GZIP_FILE in $( wget --quiet -O - $_URL | perl -ne 'print "$1\n" if /href="(\d{4}[^"]+\.gz)"/g;' )
        echo "Fetching $_GZIP_FILE..."
        wget --quiet "${_URL}${_GZIP_FILE}"
        gunzip $_GZIP_FILE

Create a new folder, put this script it there and then run it. Might be useful to somebody else...

Nemo bis (talkcontribs)

Assuming you're speaking of mailman mailing lists, you can just download the whole archive in mbox format. Look for mailman docs.

Reply to "Bash script for archiving lists..."