From owner-freebsd-isp Tue Jul 17 14: 1:38 2001 Delivered-To: freebsd-isp@freebsd.org Received: from phoenix.volant.org (dickson.phoenix.volant.org [205.179.79.193]) by hub.freebsd.org (Postfix) with ESMTP id ABE5137B401 for ; Tue, 17 Jul 2001 14:01:31 -0700 (PDT) (envelope-from patl@phoenix.volant.org) Received: from asimov.phoenix.volant.org ([205.179.79.65] helo=asimov) by phoenix.volant.org with esmtp (Exim 1.92 #8) id 15Mby4-000553-00; Tue, 17 Jul 2001 14:01:20 -0700 Date: Tue, 17 Jul 2001 14:01:18 -0700 From: PM Lashley To: Alexey Zakirov Cc: freebsd-isp@FreeBSD.ORG Subject: Unnecessary cats/clean coding practices [Was: Re: jail ] Message-ID: <635860000.995403678@asimov> In-Reply-To: References: X-Mailer: Mulberry/2.1.0b2 (SunOS/SPARC Demo) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========636895628==========" Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --==========636895628========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --On Wednesday, July 18, 2001 00:11:39 +0400 Alexey Zakirov=20 wrote: > On Tue, 17 Jul 2001, PM Lashley wrote: > >> > Sorry but this is doesn't matter for jail solution. No one aware about >> > updating jails. I'm make it about 2 times per month but not so care. = In >> > the real life users most interested in the things like GD perl library >> > not the system /usr/sbin/faithd one. :) >> >> It's a matter of cultivating good practices. (That's why I called it a > > that not to be a RTFM, it just a working solution. Right. But the primary mode of human learning is by example. It is=20 incumbent upon those of us with experience to attempt to display best=20 practices even for quick working solutions. (I can't begin to tell you the = number of times I've grabbed a bit of my own code as an example, and then=20 cleaned it up before sending it out.) >> use the best practices. (Unless they are explicitly examples of bad > > Sorry but have ever seen msh? It is a shell with 2 or 3 tens lines > of code and it doesn't have a pipelinig features :) If it doesn't have pipelining features, how does the 'cat foo | xargs cmd'=20 work? Or did you mean to say that it doesn't have redirection?=20 (Personally, I would consider any shell without redirection to be too=20 crippled to be useful.) >> very much whether there's an extra 'cat' or not. BUT it is better to >> simply cultivate the habit of avoiding such constructs so that you won't >> use them where they do matter. AND the code fragment was being >> ezplicitly > > we've got a simply not too important reason to discuss. Jail is a very > important feature for the FreeBSD and I like it very much. (Looking to > scheme) It's about tens of virtual machines and they're work. We should > appreciate PHK for his work. Absolutely, no argument there at all. Nor did I intend to disparage your example. It was a useful and helpful=20 response to the original query; and should be helpful to other new jail=20 users who browse the archives. I was merely trying to point out a minor=20 improvement to your example. >> listed as an example to a less experienced admin. Examples should >> -ALWAYS- practices...) > > shell scripts get us more than one way to go Yes, and they are used as coding examples for further projects. Which is=20 another reason why it is a good idea to code them as cleanly as feasable. In many cases there will be more than one clean way to do something. But=20 there will always be even more unclean ways to be avoided. -Pat --==========636895628========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (SunOS) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjtUp58ACgkQncYNbLD8wuOIAACfT9FlAG0ZCNFMWB969lXlwOBf ANgAnjrhJeIJjSTHSY6P6M/yTRem0TDq =0lPT -----END PGP SIGNATURE----- --==========636895628==========-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message