Date: Thu, 12 Dec 2002 14:21:21 -0500 From: Paul Murphy <pnmurphy@cogeco.ca> To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-questions@FreeBSD.ORG, Roman Neuhauser <neuhauser@bellavista.cz>, Scott Robbins <scottro@despammed.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--=.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 <dnelson@allantgroup.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021212142121.2e3b5117.pnmurphy>