Evan Martin (evan) wrote in evan_tech,
Evan Martin

hate computers so much

MIME question:

Students mailed me their homework as attachments. My current strategy is something like “munpack /path/to/maildir/cur/*” to extract all the attachments.

But: Smalltalk outputs its code with CR (no LF) ending lines. Some of the extracted files are lacking any CRs or LFs. Weirder, mutt (in its inline attachment viewer) shows the CRs (as “^M”).
It seems to only happen for attachments that are text/plain, encoding base64, but not for all of them (...?!).

Which piece do I blame?

I can manually export them one by one, but how many will that be?
for i in *; do grep '^M' $i >/dev/null || echo $i; done | wc -l

Tags: fourth wall, grumpy

  • blog moved

    As described elsewhere, I've quit LiveJournal. If you're interested in my continuing posts, you should look at one of these (each contains feed…

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • treemaps

    I finally wrote up my recent adventures in treemapping, complete with nifty clickable visualizations.

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.