I want to email the file returned by the following command as an attachment (on RHEL/CentOS):
ls -1 $(hostname -s)*.xml | tail -n 1
For example, the command above returns
server-20140430080511.xml and I want to then email that file to a recipient from the command line, all done in the one command (on one line) so that we can script/automate this process.
Can anyone suggest how to do this on a single line?