Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] SPELL > SCRIPT

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: flux <flux AT sourcemage.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] SPELL > SCRIPT
  • Date: Thu, 24 May 2012 18:50:33 +0900

Thomas Orgis (thomas-forum AT orgis.org) wrote [12.05.24 18:33]:
> Am Thu, 24 May 2012 21:19:10 +1200
> schrieb AbH Belxjander Draconis Serechai <belxjander AT gmail.com>:
>
> > wholesale replacement using a grep?
>
> Something along that, yes. Though, naturally, I'd do something along
>
> perl -pi -e 's:\$\{SCRIPT_DIRECTORY\}:\${SPELL_DIRECTORY}:g;
> s:\$SCRIPT_DIRECTORY:\$SPELL_DIRECTORY:g;' $spell_file
>
> others would use sed ... but, well, that is not the point: The point is
> whether we should start an argument about ${varname} vs. $varname;-)

In either case they're both wrong, because they need to be quoted.
Beyond the quoting, the braces are only going to matter if the variable
name needs to be disambiguously differentiated from what follows.

--
Justin "flux_control" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux
http://www.sourcemage.org

Attachment: pgpYitGMIaiEn.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page