In message <[EMAIL PROTECTED]> you wrote:
> 
> >     [EMAIL PROTECTED] fw_printenv -n hostname ipaddr
> >     ## Error: `-n' option requires exactly one argument
> >     [EMAIL PROTECTED] echo $?
> >     1
> 
> But I don't understand what the purpose of the "-n" option is?

The purpose seems clear to me - print the value of a variable without
the name. This can be useful in shell scripts, for example when you
want to do something like

        $ ipaddr=`fw_printenv -n ipaddr`

However, the addition of this feature is undocumented (not mentioned
in the commit message), and I don;t see why we should restrict it to a
single variable - it may be useful to print several values here, too,
for example like that:

        $ set `fw_printenv -n netdev ipaddr netmask`
        $ ifconfig $1 $2 netmask $3

[Well, I know that's a bad example because  it's  missing  all  error
checking, but you get the idea.]

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
It is impractical for  the  standard  to  attempt  to  constrain  the
behavior  of code that does not obey the constraints of the standard.
                                                          - Doug Gwyn

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to