3
이 스크립트가 왜 두 개의 전자 메일을 보내는 대신 왜 두 개의 전자 메일을 보냅니 까?이 간단한 전자 메일 스크립트가 매번 두 개의 전자 메일을 보내는 이유
#!/bin/sh
MONITORDIR="/path/to/directory"
inotifywait -m -r -e create --format '%w%f' "${MONITORDIR}" | while read
NEWFILE
do
[ -z "${NEWFILE}" ] && : || MOVIE=$(find "$NEWFILE" -type f -not -name ".*"
\(-iname "*.mkv" -o -iname "*.mp4" -o -iname "*.avi" \) -exec basename {}
\; | sed 's/\.[^.]*$//')
[ -z "${MOVIE}" ] && : || echo "Please don't reply to this
automatically generated email message." | mail -s "$MOVIE is now on Plex!"
"[email protected],[email protected]"
done
두 번째 마지막 줄에있는 두 개의 이메일 주소를 하나로 대체하려고 시도 했습니까? – Syfer
@Syfer 두 개의 전자 메일입니다. –
그냥 확인, 그것은 두 이메일 주소로 동일한 이메일을 두 번 보내시겠습니까? – swapnilsm