#!/usr/bin/bash
# Attach files to Thunderbird Composer
# http://www.mageia-gr.org/forum/viewtopic.php?f=21&t=506

attachments=""
counter=0
for i in "$@"; do
    ((counter++))
    attachments+=$i
    if [ $counter -lt "$#" ]; then
    attachments+=,
    fi
done
thunderbird -compose "attachment='$attachments'"


