Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2000 21:24:49 +0100
From:      Ben Smithurst <ben@FreeBSD.org>
To:        Mark Ovens <marko@freebsd.org>
Cc:        Rahul Siddharthan <rsidd@physics.iisc.ernet.in>, FreeBSD Questions <questions@freebsd.org>
Subject:   Re: Netscape, may be off topic
Message-ID:  <20000816212449.D18766@strontium.scientia.demon.co.uk>
In-Reply-To: <20000816194013.A254@parish>
References:  <3998935A.720FC3BB@wiegand.org> <20000815103154.B3999@wantadilla.lemis.com> <3998A282.CB2B194B@wiegand.org> <20000815082913.B1694@physics.iisc.ernet.in> <20000816194013.A254@parish>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000816212449.D18766>