nixers
Little script I put together - Printable Version
+- nixers (https://nixers.net)
+-- Forum: Operating Systems & Administration (https://nixers.net/Forum-Operating-Systems-Administration)
+--- Forum: OS X (https://nixers.net/Forum-OS-X)
+--- Thread: Little script I put together (/Thread-Little-script-I-put-together)


Little script I put together - trgc - 06-09-2013

Script mails the email of your choice the time and any changes to ports since the last time it was ran. Still tweaking it but wanted to share progress.

[Image: jvmelWLlIquoX.jpg]

Code:
cp ports ~/.scripts/ports_old
port installed > ports

date >> mail
echo >> mail
echo Port changes: >> mail
diff -u ports_old ports | sed -n '1,2d;/^[-+]/p' >> mail
mail -s "System Report" {email address} < mail
rm mail