tech-userlevel archive

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

Re: rc.d/network



In article <20080918175946.GN990%apb-laptoy.apb.alt.za@localhost>,
Alan Barrett  <apb%cequrux.com@localhost> wrote:
>On Thu, 18 Sep 2008, Joerg Sonnenberger wrote:
>> On Thu, Sep 18, 2008 at 07:23:06PM +0200, Alan Barrett wrote:
>> > +                          if [ -n "$argslist" ]; then
>> > +                                  printf "%s\n" "$argslist" | tr ';' '\n'
>> > +                          else
>> > +                                  cat /etc/ifconfig.$int
>> > +                          fi | \
>> 
>> While printf is a shell builtin, tr is not. It is not even in root.
>
>Thanks.  That's easy to fix using shell builtins:
>
>                                if [ -n "$argslist" ]; then
>                                        IFS=';' eval set -- \$argslist

Why "eval set -- \$argslist" instead of "set -- $argslist"?

christos



Home | Main Index | Thread Index | Old Index