From owner-freebsd-questions@FreeBSD.ORG Fri Jan 7 16:43:36 2005 Return-Path: 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 799E416A4CE for ; Fri, 7 Jan 2005 16:43:36 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CD8F43D2F for ; Fri, 7 Jan 2005 16:43:35 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])j07GhWow013512; Fri, 7 Jan 2005 18:43:33 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) j07GhWkj002301; Fri, 7 Jan 2005 18:43:32 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)j07GhWFH002300; Fri, 7 Jan 2005 18:43:32 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 7 Jan 2005 18:43:32 +0200 From: Giorgos Keramidas To: Tom Vilot Message-ID: <20050107164332.GB2249@orion.daedalusnetworks.priv> References: <41DEBA93.8060909@vilot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41DEBA93.8060909@vilot.com> cc: questions@freebsd.org Subject: Re: my lame attempt at a shell script... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2005 16:43:36 -0000 On 2005-01-07 09:36, Tom Vilot wrote: >Eric F Crist wrote: >> What is the point of the { } around some variables? > > It's not strictly necessary, except in some cases. i.e: > > m=34 > echo $m > > You don't need it there. > But you would want it here: > > f=/var/filename > fname=${f//name/name2} Or when characters adjacent to the variable name may be difficult to separate from the name itself: disk="ad0" slice="${disk}s1" partition="${slice}a" # echo "${disk} ${partition} ${slice}" - Giorgos