From owner-freebsd-questions Wed Jan 30 19: 2:18 2002 Delivered-To: freebsd-questions@freebsd.org Received: from spitfire.velocet.net (spitfire.velocet.net [216.138.223.227]) by hub.freebsd.org (Postfix) with ESMTP id E525F37B402; Wed, 30 Jan 2002 19:02:13 -0800 (PST) Received: from wenk (H204.C233.tor.velocet.net [216.138.233.204]) by spitfire.velocet.net (Postfix) with SMTP id A8371FB453F; Wed, 30 Jan 2002 22:02:12 -0500 (EST) Message-ID: <041f01c1aa1d$4a08aaa0$b300a8c0@wenk> From: "Jeff Shevlen" To: "Giorgos Keramidas" Cc: References: <20020131022255.GA73150@hades.hell.gr> Subject: Re: CVSup release info Date: Wed, 30 Jan 2002 22:05:30 -0800 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-Mimeole: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Very cool! El cheapo, but it el works'o! I am full newbie with shell scripting, but if you could give a brief explanation of what's happening here that would be great. Would these be examples of macros? I have a pretty good idea what the second script does, but the first script is a complete mystery. : El cheapo trick to get the version of the installed system (not the : sources, but the RUNNING system version): : : $ ( echo '#include ' ; echo __FreeBSD_version ) | cpp -E - | tail -1 : 500028 : : And the same trick for the sources of /usr/src/sys: : $ grep '#define[[:space:]]*__FreeBSD_version' /usr/src/sys/sys/param.h | awk '{print $3}' : 500029 : : (Yes, don't ask. I do need to build world soon again, there has been : a version bump, since I last compiled my -CURRENT :P) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message