Thanks!!! that worked. It brought about an issue.
lastfile="$( ls -1tr /rae/tmp/reportmounts.*.* | head -1 )"
works, but if it is the first file being put in the directory, it says no $lastfile exist. So I am trying to create an if statement that will check else just use the existing file...
PDreyer!!! Thanks for your help it works. I am in the final stage of the script.
Question 1:
The output is created in a file called reportmounts which is appended with the DATE.TIME.
I want to email the latest DATE.TIME stamped file content view email to an address.
How do I script this...
I am a new to scripting. I am working with a script to replace the
word 'name' in a file with the name of the server. I am trying pass a
variable in a search and replace command using sed. It works now, but
only replaces the word 'name' with the '${SERVER}: name' and not the
actual hostname...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.