2
ターミナルからメールを送信するためのMail.appのラッパースクリプトを作成する
私はbashとapplescriptを使って端末からメールを送信しようとしています。私は引数とEメールメッセージ本文の世話をするためにbashを使います。それから私はMail.appでメールを送るのにApplescriptを使ってみました。私は私が得る次のことを試みるとき、私はいくつかの問題に遭遇した、しかし 4:4: syntax error: Expected expression but found end of script. (-2741) #!/bin/bash if [ $# -ne 2 ] then echo "Arguments: <subject> <recipient>" >&2 #stderr exit 1 fi read message applescript=" tell application \"Mail\" set theMessage to make new outgoing message with properties {visible:true, subject:${1}, content:${message}, address:${2}} send theMessage …