- How to add/edit email aliases:
This is useful when you have to send a report to many emails and you don't want to stress out too much the command line.
For example, you need to send email to , and .
/etc/mail/aliases in your favorite editor and add the following line:
reporting: , ,
Save the file and execute the command
gzaix@root:/etc/mail # newaliases WARNING: Group writable directory /var/spool WARNING: Group writable directory /var/spool/mqueue /etc/mail/aliases: 8 aliases, longest 121 bytes, 374 bytes total
Now your command line will be much simpler:
/some/script.sh | mail -s "Reporting of the script.sh" reporting
PS: this was done on AIX but it should work on all distributions.