Linux, Unix, /etc/

$ To set up this Linux system, do I really have to type long, cryptic, frequently inconsistent and undocumented commands with occasional long strings of hex digits?

# Yeah. You got a problem with that?

Sponsored links (requires javascript):

#!/bin/ksh
#chkpop: check for mail in a pop3 mailbox
case $1 in
"")
    1>&2 echo "chkpop: chkpop "
    exit 2
    ;;
esac
line=$(awk '/'$1'/ {print $2, $4, $6}' < $HOME/.netrc)
if [ "$line" = "" ]
then
    exit 0
fi
set x $(echo $line)
server=$2
login=$3
password=$4
(echo user $login;echo pass $password;echo quit) |
nc $server 110 |
tee /tmp/chkpop.server_responses |
awk '
	/^\+OK/{
	if (match($0,/[1-9]/))
		{print "you have mail on '$server'"; exit 0}
	else
		{exit 1}
	}
'
exit $?


main | scripts | contact | links

Sponsored links (requires javascript):