Aloha! I am running Mac OSX Yosemite. I have an mbox file exported from my mail system and I would like to run a script to split the file into individual text files, one for each message contained. I also would like the filename to be a customized text string containing the subject of the message and a numeric iterator to resolve the issue of duplicate subjects (I don't want to overwrite messages with identical subjects). I would expect the script to produce file output corresponding to below:
Subject A 1.txt
Subject B 2.txt
Subject C 3.txt
Subject A 4.txt
Mahalo!