want to use “diff” command on latest 2 files and then send that output on mail
Hello All,
On suse linux, I am having below files in one same folder and from that all files I want to use diff command on latest 2 files and want to save output of diff command in one separate file and then want to send that file through mail as attachment. I want to do this on weekly basis.
Can you please help me on this.
Thanks in advance.. :-)
-rw-r--r--. 1 root root 4.2K Aug 27 00:22 10.10.10.10_2015_08_27.cfg
-rw-r--r--. 1 root root 124 Sep 3 00:23 10.10.10.10_2015_09_03.cfg
-rw-r--r--. 1 root root 124 Sep 4 00:00 10.10.10.10_2015_09_04.cfg
-rw-r--r--. 1 root root 124 Sep 5 00:00 10.10.10.10_2015_09_05.cfg
-rw-r--r--. 1 root root 124 Sep 6 00:00 10.10.10.10_2015_09_06.cfg
-rw-r--r--. 1 root root 124 Sep 7 00:00 10.10.10.10_2015_09_07.cfg
-rw-r--r--. 1 root root 124 Sep 8 00:00 10.10.10.10_2015_09_08.cfg
-rw-r--r--. 1 root root 124 Sep 9 00:00 10.10.10.10_2015_09_09.cfg
-rw-r--r--. 1 root root 124 Sep 15 01:47 10.10.10.10_2015_09_11.cfg
Last edited by spande; 09-15-2015 at 04:29 AM.
|