hush a bit improved, much work remains

Denis Vlasenko vda.linux at googlemail.com
Tue May 22 22:41:12 UTC 2007


On Wednesday 23 May 2007 00:17, Martin wrote:
> i was on holiday so it took some time but im please to tel you its working
> again on the 1.5.1 version

Because of your report IIRC

> its NOT working on the current CVS (current CVS is just crashing my player)

What exactly is not working? We have testsuite now, whenever we have
a good testcase, we can put it into testcases and it will be checked
for breakage everytime testsuite is run.

Just "NOT working" is not of much help.
Two-page script which is not working is better.
Two-line script which is not working is even better.

> but i still have 1 problem with hush compared to msh
> 
> i need to use msh for the folowing script
> 
> #!/bind/msh
> cd /hdd/stage2/bin
> TESTVAR1=`./nvram -get HNFS | cut -d = -f3`
> echo "TESTVAR1=$TESTVAR1"
> if [ "$TESTVAR1" = " Disabled" ]
> then
>  echo disabled
> else
>  echo Enabled
> fi
> 
> (the output from the external ./nvram -get HNFS program is just a ascii
> Enabled or Disabled output, but its not related to this program)
> 
> this work for msh
> this dont work for hush
> 
> hush will give me the output:
> 
> hush: cannot exec: Enabled: Invalid argument
> TESTVAR1=
> [: Disabled: unknown operand
> Enabled

Current svn works for me:

# cat z
TESTVAR1=`echo Enabled`
echo "TESTVAR1=$TESTVAR1"
if [ "$TESTVAR1" = " Disabled" ]
then
  echo disabled
else
  echo Enabled
fi

# ./busybox hush z
TESTVAR1=Enabled
Enabled

--
vda



More information about the busybox mailing list