Skip to Content.
Sympa Menu

sm-sorcery - Re: [SM-Sorcery]$IFS

sm-sorcery AT lists.ibiblio.org

Subject: Discussion of Sorcery related topics

List archive

Chronological Thread  
  • From: Dufflebunk <dufflebunk AT dufflebunk.homeip.net>
  • To: "Sergey A. Lipnevich" <sergeyli AT pisem.net>
  • Cc: sm-sorcery AT lists.ibiblio.org
  • Subject: Re: [SM-Sorcery]$IFS
  • Date: 21 Oct 2002 01:23:47 -0400

One odd side effect that I just found is that:
echo $foo | while read i ; do
#This is all executed in a sub shell!
done

Meaning environment modified inside the loop will not persist after the
loop. Example:
a="a"
echo -e "a\nb" | while read i ; do
a="${a}${i}"
echo $a
done
echo "Final: $a"

Here is the output:
aa
aab
Final: a

Not what you would expect. Although it makes sense when you look at it
closely, it still surprised me, so I though it might help others too.


On Sat, 2002-10-19 at 01:10, Sergey A. Lipnevich wrote:
> Hi All,
>
> In my working copy I have managed to ridden cast, libdepends, libmisc,
> and libcodex, of $IFS. It all looks good and I'm doing /a lot/ of tests
> on virtually all my changes. Any objections to committing this sometime
> tomorrow?
> Also, it solves the following bug in sorcery 20021018: when there is an
> optional_depends with the spell that's not installed, no other
> optional_depends below it get called.
> And it looks much better without $IFS ;-).
>
> Sergey.
>
> _______________________________________________
> SM-Sorcery mailing list
> SM-Sorcery AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-sorcery
>
--


Quidquid latine dictum sit, altum sonatur.
-----------------
PGP public key at
http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x3327A9A5
F1

Attachment: signature.asc
Description: This is a digitally signed message part




Archive powered by MHonArc 2.6.24.

Top of Page