How to read file content and send email on Debian Bullseye

Jim Jackson jj at franjam.org.uk
Sun Feb 5 13:00:39 EST 2023


On 2023-02-05, ^Bart <gabriele1NOSPAM at hotmail.com> wrote:
>> For example, try to do whatever parts you know how to do and when some part
>> fails or is missing, ask.
>
> You're right but first of all I wrote what I'd like to do and if Python 
> could be the best choice about it! :)

I'd say you want a simple shell script wrapped around your job, and a 
program to send email (bsdmail/sendmail or similar or mstmp on linux for 
instance).

>
>> I might have replied to you directly if your email email address did not
>> look like you want no SPAM, LOL!
>
> Ahaha! I think you know what is spam and what is a reply\answer to a 
> post request so you can feel free to use also my email! :)
>
>> The cron stuff is not really relevant and it seems your idea is to read a
>> part or all of a log file, parse the lines in some way and find a line that
>> either matches what you need or fail to find it. Either way you want to send
>> an email out with an appropriate content.
>
> You got the point!
>
>> Which part of that do you not know how to do in python? Have you done some
>> reading or looking?
>
> Like what I wrote above I didn't know if Python can does what I need and 
> if to use Python is a good way I'll start to study how to do it! :)
>
> In my past I used Python for Arduino programming or to do easy things, 
> what I should do now is little more complex but I understood from years 
> and years by the Python's powers you can do everything! LOL! :)
>
> Regards.
> ^Bart


More information about the Python-list mailing list