I've created a set of linux command that do set of ping and keep the log file into 2 file, which is date-time_successping
and date-time_failping
. I want to do an action where when date-time_failping
exist, the linux system will send an email to the PIC. but the filename is too random since i've a date infront of it. E.g. 20170911-160455_failping
. I tried using like -c/-f
, but they cannot search if no specific name. there will be multiples of file with variant of dates created. So I need some advice on this. hope anyone could help.
thanks
P/S: I'm so sorry if the information that given is not enough, please reply if needed more info so that i could try to provide and help me solve this issue.
Regards
You can do it something like this optionally,
This command is to get yesterday date:
Or you want to work with today's date