So I want to put a line at the end of my script which greps for keywords from syslog.log that outputs the following after it is done:
"This file was last modified on (thisdate)"
I know I can use the following to get the date:
rtidsvb(izivanov):/home/izivanov> ll /var/adm/syslog/syslog.log
-rw-r--r-- 1 root root 503064 Apr 12 12:06 /var/adm/syslog/syslog.log
I know I can use cut -f5 -f6 to get just the date but don't know how. How can I use that and input it into the line in the script for (thisdate)? Or is there an easier way to input date of the file.
I'm relatively new to scripting and UNIX...
Thanks a bunch...