bash: m2m verbessert
This commit is contained in:
parent
9b476a3129
commit
aabb00096a
1 changed files with 15 additions and 3 deletions
|
@ -12,8 +12,20 @@ ssh() { #() ist die kurzform von function
|
|||
tmux rename-window "$*"
|
||||
command ssh "$@"
|
||||
}
|
||||
# sende eine Datei per Mail
|
||||
# $1 = Titel und Body, $2 Pfad zu Datei
|
||||
function m2m {
|
||||
echo "$1" | mail -s "$1" -A "$2" michael.grote@posteo.de
|
||||
if [[ "$1" == "--help" ]]; then
|
||||
echo "Sende Datei '$2' per Mail; Betreff = '$1'"
|
||||
echo "m2m = mail2me"
|
||||
echo "m2m <Pfad zu Datei> <Betreff>"
|
||||
else
|
||||
if [ ! -f "$1" ]; then
|
||||
echo "Dateipfad fehlt..."
|
||||
else
|
||||
if [ -z "$2" ]; then
|
||||
echo "Betreff fehlt..."
|
||||
else
|
||||
echo "$1" | mail -s "$1" -A "$2" michael.grote@posteo.de
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue