[U-Boot] Regarding HUSH support in uboot

Hi How do we know whether hush shell capability is supported or not in the command shell.I have enabled CONFIG_SYS_HUSH_PARSER in in config file. I am trying to write simple script like below myname=`test` if $myname=test then echo "test" else echo "failed" fi I am getting the following error "unknown command test". Can anybody please let me know if the hush shell is eanbled or not. Thanks Amruth p.v

Dear amruth vamadev,
In message CAL5DGCRuO3aYZjTDoQbgSzd6-d4KAgsO7BfvSnPhyajx3LMoOw@mail.gmail.com you wrote:
How do we know whether hush shell capability is supported or not in the command shell.I have enabled CONFIG_SYS_HUSH_PARSER in in config file.
A simple test is
echo a && echo b
If you get "a && echo b" back, then hush is not active.
Best regards,
Wolfgang Denk

Wolfgang Denk Thanks for response.If I want to store those strings into variable and may be compare it or parse it for information.For example "echo a" redirected to variable like assignment. My goal is to write simple diags to test pci or serial flash using commands in the shell using script. We can issue the commands and parse the response and print useful messages to users. myvar = echo a if itest.s myvar == a then echo 'a" else echo "no a" Any idea how we can achieve this. Thanks Amruth p.v
On Fri, Jan 6, 2012 at 2:47 PM, Wolfgang Denk wd@denx.de wrote:
Dear amruth vamadev,
In message CAL5DGCRuO3aYZjTDoQbgSzd6-d4KAgsO7BfvSnPhyajx3LMoOw@mail.gmail.com you wrote:
How do we know whether hush shell capability is supported or not in the command shell.I have enabled CONFIG_SYS_HUSH_PARSER in in config file.
A simple test is
echo a && echo b
If you get "a && echo b" back, then hush is not active.
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: wd@denx.de The one who says it cannot be done should never interrupt the one who is doing it.

Dear amruth vamadev,
In message CAL5DGCQABjk_F8T2-3XLFJkmp8ZvPwH_RvAa2i_==jS+8__mpA@mail.gmail.com you wrote:
Thanks for response.If I want to store those strings into variable and may be compare it or parse it for information.For example "echo a" redirected to variable like assignment. My goal is to write simple diags to test pci or serial flash using commands in the shell using script. We can issue the commands and parse the response and print useful messages to users.
Such test code should most probably be integrated into the POST framework.
myvar = echo a if itest.s myvar == a then echo 'a" else echo "no a" Any idea how we can achieve this.
Current hush implementation does not support backticks or $(cmd) notation. You will have to chose a differnt style.
Best regards,
Wolfgang Denk
participants (2)
-
amruth vamadev
-
Wolfgang Denk