[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 38

On Fri, Aug 27, 2010 at 9:58 AM, Adam Borowski <kilobyte@angband.pl> wrote:
> On Fri, Aug 27, 2010 at 10:30:07AM +0400, Stanislav Maslovski wrote:
>> On Fri, Aug 27, 2010 at 12:22:08AM +0200, posion bit wrote:
>> > There are 38 unquoted $i in /etc in i386 installing base+laptop+standar
>> >
>> > There are 172 "$i" (maching without spaces around) 38 of them matches
>> > whit spaces around (unquoted).
>> >
>> > Some are iteration numbers, some are directory, files, etc...
>> >
>> >     grep -R ' $i ' /etc/ | grep -viE '(binary|no such)'
>> So, what is the problem with this? Both usages are legitimate (if one
>> understands what she is doing, of course).

look one so simple in /etc/init.d/rc

                        for i in /etc/rc$runlevel.d/K$level*
                                # Check if the script is there.
                                [ ! -f $i ] && continue

The [ ! -f $i ] is not going to make what she was meaning (thinking
she know what she was doing)

Now, as I am a troll, you can say like I don't know a fuck and
everybody with svn access is a master.

I'm not going to fill a lot of little bugs for this, I expect debian
scripts to be designed following some simple bash best practices.

> touch "o rly?"
> While many of these are false alarms (numbers, fixed names, ...), the
> problem is real.  Sometimes you even have a proper and improper usage on the
> same or on subsequent lines:
> (/etc/mc/mc.menu)
>          case "$i" in
>            *.tar.gz)  D="`basename $i .tar.gz`";;

mmmm In that case, name-spaced filenames should work, because the
string is a _quoted_ multi-word string.

> I just don't get why posion singles out $i among all other possible variable
> names.  Or /etc/ when that's not the main place where you find scripts in.

ok, change by \w the example command and match more, but I think there
is nothing like a human (being) review.

Reply to: