Wednesday, September 13, 2006

how to update ports on freebsd (better way)

first get cvsup_fastest

then make a script

#!/bin/sh
cvsup -gL2 -h`cvsup_fastest -Q -c us` /usr/share/examples/cvsup/ports-supfile



cron this or whatever

Tuesday, September 12, 2006

unix shell scripting: args check

usage()
{
echo "Usage: program [args] [bleee]"
}
if [ $# -eq 0 ] ; then
echo "ERROR Insufficient arguments"
usage
exit 1
fi

Monday, September 11, 2006

send email on solaris 8 with xmail

/bin/mailx -s "subject" email@address.com < /path/to/message/body.txt

the message body has to be a file.