From owner-freebsd-chat@FreeBSD.ORG Wed Sep 17 15:08:56 2003 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1ED516A4B3 for ; Wed, 17 Sep 2003 15:08:56 -0700 (PDT) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 031F143FF2 for ; Wed, 17 Sep 2003 15:08:56 -0700 (PDT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.12.9/8.12.9) with ESMTP id h8HM8sC2043632; Wed, 17 Sep 2003 15:08:54 -0700 (PDT) (envelope-from bakul@bitblocks.com) Message-Id: <200309172208.h8HM8sC2043632@gate.bitblocks.com> To: Dan Nelson In-reply-to: Your message of "Wed, 17 Sep 2003 16:54:29 CDT." <20030917215429.GB51544@dan.emsphone.com> Date: Wed, 17 Sep 2003 15:08:53 -0700 From: Bakul Shah cc: freebsd-chat@freebsd.org Subject: Re: UNIX Humour X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2003 22:08:56 -0000 > The original comment was supposed to read "self-compiling", but I like > your modification too :) Don't forget the set -x, or a compile error > will result in errors running and removing ${0%%.c}. :-) Actually this is a useful thing to do. For files containing a library of functions I tend to add main() to test out these functions like so: #ifdef TESTING int main(int argc, char**argv) { ... } #endif Now I can write a self-testing .c file!