[MlMt] Generating a report from a smart mail box

Bill Cole mmlist-20120120 at billmail.scconsult.com
Sat Oct 15 22:44:35 EDT 2016


On 15 Oct 2016, at 17:14, Robert Booth wrote:

> To make this simpler I created a shell script to open the cvs file.
>
> cat ./bin/OpenMainMateVisualize.sh
> #
> #
> open 
> ../../var/folders/ts/grmqglgs7zd1nwgy9gwznz2c0000gp/T//com.freron.MailMate.Visualize.csv
>
> thanks a lot.


That part between folders/ and /T is unique to each user, can change 
across logins, and is likely to change across reboots but there's a way 
to handle that. Unix tradition (as well as formal standards like SUS and 
POSIX) provides an environment variable named TMPDIR which is a 
recommendation to programs of where to put temporary files instead of 
the fixed shared directories /tmp/ and /var/tmp/. On MacOS TMPDIR is a 
directory named 'T' at the 3rd level below /var/folders/, so instead of 
that long fixed pathname you could just say:

open $TMPDIR/com.freron.MailMate.Visualize.csv

That way you'll probably never need to change the script again.


More information about the mailmate mailing list