HOWTO send mails through the shell
# cat mail_body.txt | mail -s "This is the subject" -F from@email.com -t to@email.com
You can use echo "This is the body" instead of cat mail_body.txt
# cat mail_body.txt | mail -s "This is the subject" -F from@email.com -t to@email.com
You can use echo "This is the body" instead of cat mail_body.txt
# tar cpf archive.tar archive/
# tar Wdf archive.tar
tar -W or tar --verify checks the tar archive with the filesystem dir
The errors are redirected on stderr ( 2> tar_error.txt )
# gzip archive.tar
# gzip -tvv archive.tar.gz
or
# bzip2 archive.tar
# bzip2 -tvv archive.tar.bz2
output is redirected to stderr (even if the test is successful) and is similar to
archive.tar.bz2: OK
You can test it redirecting the output to a file $TEST and then using
if [ "$(awk '{print $2}' $TEST)" != "OK" ]; then
#manage error
exit
else
...
fi
# pkg_add -i colorls
# pacman -Sy python
$ cat ~/.profile
Download and install MacPorts from http://www.macports.org
Buy a Serial DB9 male to USB like this one: http://www.iogear.com/product/GUC232A/