Re: [wmii] wmii9rc Problem

From: sqweek <>
Date: Sun, 21 Oct 2007 14:06:22 +0800

On 10/21/07, S.P.Tseng <> wrote:
> On 20/10/07 20:45, S.P.Tseng wrote:
> >
> > The latest wmii hg-2007/10/20
> > The wmii9rc have some problem.
> > --------------------------------------------------------------
> Sorry to my careless.
> And I have tried wmii-20071003. wmii9rcs still can not find
> /usr/local/9 except put "export PLAN9=/usr/local/9" in .xinitrc

  Ah, you're right, it doesn't work. My earlier test didn't cut it.
But I'm not particularly surprised, given what I discovered:

sh-3.2$ IFS=:
sh-3.2$ for i in `echo /opt:/:/usr`; do echo $i; done
sh-3.2$ for i in `echo $HOME:/opt:/:/usr`; do echo $i; done
/home/sqweek /opt / /usr

  What the fuck? Lets try that a slightly different way in case I'm
just imagining it...

sh-3.2$ for i in `echo /opt:/:/usr:$HOME`; do echo $i; done
/opt / /usr /home/sqweek

  Yep, variable expansion totally asses up field splitting. Thanks bourne shell!
  Well, it doesn't ass it up to be strictly correct, but it causes
field splitting to happen twice - first after the expansion of $HOME,
then after evaluating the echo. But the echo doesn't output any :
because the previous field split turned them into whitespace, and
whitespace isn't part of IFS anymore...
Received on Sun Oct 21 2007 - 08:06:23 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:30:18 UTC