Date: Fri, 1 Jun 2012 00:15:47 -0400 From: Jason Hellenthal <jhellenthal@dataix.net> To: Doug Barton <dougb@freebsd.org> Cc: d@delphij.net, freebsd-rc@freebsd.org Subject: Re: Script style: ` or $()? Message-ID: <20120601041547.GB97671@DataIX.net> In-Reply-To: <4FC81FC2.1020307@FreeBSD.org> References: <4FC694C9.9040501@delphij.net> <CADLo83-FhG13uwspUd=JmjO%2BrY=D5rMW4F5hEbnmHqkjQaq40Q@mail.gmail.com> <4FC81FC2.1020307@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 31, 2012 at 06:49:54PM -0700, Doug Barton wrote: > On 5/31/2012 2:29 PM, Chris Rees wrote: > > Seems that either no preference or $() is the rule, >=20 > I not only wouldn't say that, I didn't when I responded previously. :) >=20 > > but if you're > > documenting a code example that is designed to be copy/pasted to a > > shell then you should use `` -- otherwise you make life very difficult > > for t?csh users. >=20 > Valid point, except that he specified that he is writing an rc.d script > (which makes sense considering the list ...). >=20 Writing code to be copy and pasted is a bad idea anyway. It just invites unsuspecting users that do not understand what ramifications can come =66rom running code they don't understand. A simple slip of the mouse could cause someone great grief. Lets not forget too... some terminals/web browsers and other forms of text transportation can copy in different ways, inserting control characters that you don't see the results before running. But this is an rc.d example soooo $() should be fine as its reccomended more often than not. --=20 - (2^(N-1)) --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJPyEHyAAoJEBSh2Dr1DU7W/UoH/j2pWPz9XnnjNX8RlgxNw6xh JoF63lv++ff+KaV/f21jf+a+eL01L5S299fHYqiat2W0brgkybBhhWIoiIRwBWxt op/qVECl/KAkZ+nbLwX1JodvDqbq6vii0E6vZ6qZHkAAKQUFgJDaDTX3swPUMwd9 Jz6+sEKHIWQPixqL4RUak9rgvvkDK404w/yzosXZtn5G4ccbXm58QmXEZbZE3KC8 mmspf+TBvbtcKzCqoJ/6D48FT0Ka/ZxXpui5NFXTEYmNKRW4AMYGVlnfm5WX8U9V StqOAFISAdZkVtLY8VW5AXT92Qe9sJSL1VgaJs3Rvv110G8v9XoUPqq1k1QFCfY= =c9ca -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120601041547.GB97671>