The snippet you posted seems to be a shell script that creates part of a C source file:
Code:
if [ ".`whoami`" != ".root" ]; then
echo "you had to be root to do this!"
exit 1
fi
<= THIS IS PURE SHELL: IT CHECKS TO SEE IF THE CURRENT USER IS "ROOT"
echo "Now creating socket demon in " $HIDE
<= THIS, TOO, IS PURE SHELL: IT PRINTS OUT THE TEXT ("Now creating..."), FOLLOWED
BY THE VALUE OF THE SHELL VARIABLE "$HIDE".
VARIABLES "HIDE" AND "PORT" WERE BOTH SET SOMEWHERE ELSE
echo "#define PORT " $PORT > socketdemon.c
cat >>socketdemon.c <<'EOF'
#include <stdio.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
<= THIS CAUSES THE REST OF THE SCRIPT TO BE WRITTEN VERBATIM INTO THE
FILE "SOCKETDEMON.C"
The syntax "<<'EOF'" is called a "here script". You can read more about them in the link jailbait pointed out:
http://www.tldp.org/LDP/abs/html/here-docs.html