Quoth Nicolas Williams on Wed, Jun 11, 2008 at 12:03:23PM -0500: > On Wed, Jun 04, 2008 at 05:38:07PM -0500, Nicolas Williams wrote: > > - svcprop -o sh ... > > I'll retain this option as well, but it will be designed so the output > is to be used as follows: > > % # Disable globbing and field-splitting > % set -f > % OIFS=$IFS > % IFS= > % eval set -- `svcprop -o sh -c -p $pg/$prop $fmri` > % > > Yes, that's right: use eval. svcprop will make that safe by quoting > '$', '\' and other special characters, as well as all non-US-ASCII > values (except, perhaps, for props with the Unicode string type, though > then maybe only if the current locale uses UTF-8 -- haven't looked > closely at this yet). > > These are the only ways I've found of preserving property values that > contain newlines, other non-printable characters, and even non-ASCII > codes.
What happens if you don't use eval? David