From owner-freebsd-questions Thu Dec 12 11:21:52 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9818B37B401 for ; Thu, 12 Dec 2002 11:21:50 -0800 (PST) Received: from fep1.cogeco.net (smtp.cogeco.net [216.221.81.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFF0443EC5 for ; Thu, 12 Dec 2002 11:21:49 -0800 (PST) (envelope-from pnmurphy@cogeco.ca) Received: from earth.upton.net (d141-18-230.home.cgocable.net [24.141.18.230]) by fep1.cogeco.net (Postfix) with SMTP id 3143C9AB3; Thu, 12 Dec 2002 14:21:41 -0500 (EST) Date: Thu, 12 Dec 2002 14:21:21 -0500 From: Paul Murphy To: Dan Nelson Cc: freebsd-questions@FreeBSD.ORG, Roman Neuhauser , Scott Robbins Subject: Re: Shell variables Message-Id: <20021212142121.2e3b5117.pnmurphy@cogeco.ca> In-Reply-To: <20021212154334.GC7232@dan.emsphone.com> References: <20021212075922.13985ff8.pnmurphy@cogeco.ca> <20021212154334.GC7232@dan.emsphone.com> X-Mailer: Sylpheed version 0.8.6claws (GTK+ 1.2.10; i386-portbld-freebsd4.7) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="=.aKGKKth?5rdI.m" 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 --=.aKGKKth?5rdI.m Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 12 Dec 2002 09:43:34 -0600 Dan Nelson wrote: > In the last episode (Dec 12), Paul Murphy said: > > I am having trouble understanding what is the difference between > > "$variable" and "${variable}". > > > > I have read sh(1) and understand than ${} is a "parameter" and can > > contain more than just a variable, but browsing through /etc/rc I > > see lots of "${variable}" (i.e. "case ${svc_val} in"). > > > > Is this just for readability or is there some functional difference? > > Mainly readability, but sometimes you need the {}'s to delimit the > variable name: compare > > echo texttext${variablehere}texttext > > vs. > > echo texttext$variableheretexttext > Thanks all, I've got it now. -- Cogeco ergo sum --=.aKGKKth?5rdI.m Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE9+OG3Tv5Mxsi/WPMRAgTpAKCwl5tMuArvd/Nkkjhd/tIv7pDS8ACdGLvF C8g/Zp89KOyGNeoL31VDkZA= =7ByU -----END PGP SIGNATURE----- --=.aKGKKth?5rdI.m-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message