From owner-freebsd-questions Wed Aug 16 14:30:13 2000 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 5660737B69E; Wed, 16 Aug 2000 14:30:00 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=root) by scientia.demon.co.uk with esmtp (Exim 3.16 #1) id 13P9k1-0005E8-00; Wed, 16 Aug 2000 21:24:49 +0100 Received: (from ben@localhost) by strontium.scientia.demon.co.uk (8.9.3/8.9.3) id VAA09123; Wed, 16 Aug 2000 21:24:49 +0100 (BST) (envelope-from ben) Date: Wed, 16 Aug 2000 21:24:49 +0100 From: Ben Smithurst To: Mark Ovens Cc: Rahul Siddharthan , FreeBSD Questions Subject: Re: Netscape, may be off topic Message-ID: <20000816212449.D18766@strontium.scientia.demon.co.uk> References: <3998935A.720FC3BB@wiegand.org> <20000815103154.B3999@wantadilla.lemis.com> <3998A282.CB2B194B@wiegand.org> <20000815082913.B1694@physics.iisc.ernet.in> <20000816194013.A254@parish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000816194013.A254@parish> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mark Ovens wrote: > #!/bin/sh > > ( emacsclient $* || emacs $* ) > /dev/console 2>&1 "$@" (with the quotes) is safer than $* since it does the right thing with spaces and so on in arguments. Out of $*, "$*", $@ and "$@", the last one is the only one to get it right in all cases. Try it yourself with a simple program which just does for (i = 0; i < argc; i++) printf("argv[%d] = %s\n", i, argv[i]); -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D FreeBSD Documentation Project / To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message