Send Motion-user mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Re: How do I include file size in my on_movie_end email?
      ([email protected])
   2. Re: How do I include file size in my on_movie_end email
      SOLVED (Fog Watch)


----------------------------------------------------------------------

Message: 1
Date: Sat, 8 Aug 2020 06:42:33 -0700
From: [email protected]
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] How do I include file size in my
        on_movie_end email?
Message-ID:
        <CAGd+P+bJBWuoLhiy_ia2_+sEM0QzqfCR_k=yh6of4zu1emv...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

You could include *echo File Size: $(stat -c%s %f) *in your script line...

On Sat, Aug 8, 2020 at 4:28 AM Fog Watch <[email protected]> wrote:

> Hello
>
> My on_movie_end statement successfully sends me an email:
> on_movie_end file=%f; echo -e "Subject: Motion detected \n\n $file" |
> sendmail -v [email protected] > /dev/null 2>&1
>
> Is there any way of including the filesize in this email?
>
> Cheers,
>
> Fog Watch.
>
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Sun, 9 Aug 2020 17:28:06 +1000
From: Fog Watch <[email protected]>
To: [email protected]
Subject: Re: [Motion-user] How do I include file size in my
        on_movie_end email SOLVED
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

On Sat, 8 Aug 2020 06:42:33 -0700
[email protected] wrote:

> You could include *echo File Size: $(stat -c%s %f) *in your script
> line...
>

Thanks. The following works well.
on_movie_end FILE=%f; echo -e "Subject: Motion detected \n\n$FILE \nFile size: 
$(( $(stat -c '%s' $FILE) / 1024 / 1024 ))MB" | sendmail -v [email protected] > 
/dev/null 2>&1



------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 170, Issue 8
*******************************************

Reply via email to