<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Thu, 2010-09-16 at 06:04 -0700, Dan Nicholson wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<TT><FONT COLOR="#1a1a1a">Clearly this is just bikeshedding, but I think this practice sucks.</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">There are very clear times when the braces are useful or needed to</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">delimit variables or do parameter expansion. Every other usage is just</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">adding extra characters and typing. This diff is a perfect example of</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">it: 114 lines changed for zero functional difference.</FONT></TT><BR>
<BR>
</BLOCKQUOTE>
<BR>
My bash book implicitly agrees. The $varname syntax is a simpler form of ${varname}.<BR>
The book enumerates cases where you must use it. By not using braces when not required, it gives<BR>
additional information to the reader of the script about values the variable may or may not have.<BR>
<BR>
Gaetan<BR>
<BR>
<BR>
</BODY>
</HTML>