Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  xdg-email   Sprache: JAVA

 

#!/bin/sh

# this is poor man xdg-email wrapper for osx.
# It is intended to emulate xdg-email functionality using Mail.app and oascript.
# currently only --attach --subject and --body commands are supported
# and only first email address is used

# There is now ling args support in osx getopt, so we are doing this hack
# and transforming long options to short ones
#
# Written by Alex Samorukov, samm@os2.kiev.ua

for arg in "$@"; do
  shift
  case "$arg" in
    "--attach") set -- "$@" "-a" ;;
    "--subject") set -- "$@" "-s" ;;
    "--body")   set -- "$@" "-b" ;;
    "--help")   set -- "$@" "-h" ;;
    *)        set -- "$@" "$arg"
  esac
done

# Default behavior
rest=false; ws=false

ATTACH=""
SUBJECT=""
BODY=""
# Parse short options
OPTIND=1
while getopts "a:s:b:h" opt
do
  case "$opt" in
    "a")  ATTACH="$OPTARG"; ;;
    "s")  SUBJECT="$OPTARG";  ;;
    "b")  BODY="$OPTARG";  ;;
    "h") echo "sends email using Mail.app from commandline"; exit 1 ;;
  esac
done
shift $(expr $OPTIND - 1) # remove options from positional parameters

TO_ADDR="$1"

SCRIPT="
set recipientName to \"\"
set recipientAddress to \"${TO_ADDR}\"
set theSubject to \"${SUBJECT}\"
set theContent to \"${BODY}\"
set theAttachmentFile to \"${ATTACH}\" -- the attachment path

tell application \"Mail\"
        ## set focus
        activate
        ## Create the message
        set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}

        ## attach file
        tell theMessage to make new attachment with properties {file name:theAttachmentFile}

        ## Set a recipient
        tell theMessage
                make new to recipient with properties {name:recipientName, address:recipientAddress}
        end tell
end tell
"
echo "$SCRIPT"|/usr/bin/osascript

Messung
CHZG
939610096

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104850
#Domains=416975