From owner-freebsd-security Tue Mar 13 16:40:25 2001 Delivered-To: freebsd-security@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 9161E37B71B for ; Tue, 13 Mar 2001 16:40:20 -0800 (PST) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id BAA51694; Wed, 14 Mar 2001 01:40:16 +0100 (CET) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: dannyman Cc: freebsd-security@FreeBSD.ORG Subject: Re: Sophos "idefetch" script References: <20010313151512.Q3500@dell.dannyland.org> <20010313161017.Z3500@dell.dannyland.org> From: Dag-Erling Smorgrav Date: 14 Mar 2001 01:40:15 +0100 In-Reply-To: dannyman's message of "Tue, 13 Mar 2001 16:10:17 -0800" Message-ID: Lines: 25 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org dannyman writes: > Is this addendum to the script okay by you? ;) Umm, the idea was actually to suggest an improvement on your own script. If you don't like it, just ignore it. 1) it's conventional to use lowercase names for variables internal to the script, and reserve uppercase names for variables passed from the shell. 2) you should always take care to wrap variable references in double quotes 3) you shouldn't redirect fetch's stderr to /dev/null, use -q to hide the status messages 4) your for loop will break if one of the IDEs' name contains funny characters; my while loop won't 5) you don't need to cd to ${idedir}, you can ask fetch to put the files there for you - though that's mostly a matter of taste DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message