Bash shell support?

walter harms wharms at bfs.de
Wed Aug 23 12:01:04 UTC 2006



i guess bb is breaking on the [[ operator. according to my shell book this
is a special for ksh and was adopted by bash also. (meaning that /bin/sh is crappy except use are using
/bin/sh -> /bin/bash as most linux dist do.)

[[ is called the ''extended test facility''

\cite
[[ ]] differs from test and [ ] commands in that word expansion and pattern expansion are not done.

lets hear if our shell expert can implement that. i guess it is not important for most case in the program
except:  if [[ $size = *%* ]]

(i guess it checks if $size contains a %, easy to rewrite)

re,
 walter






Riaz Ur Rahaman wrote:
> attaching the rwtest shell script for reference.
> 
> On Wed, 2006-08-23 at 16:06 +0530, Riaz Rahaman wrote:
>> Hi All,
>>
>> Thanks all for the info provided, I came to know a lot of things I
>> didnt know. 
>>
>> I am trying to run the ltp test cases on the busybox and there were
>> two scripts that were giving errors. One was the fs_inod and the other
>> rwtest. 
>>
>> The problem with fs_inod was that busybox doesn't support function so
>> I changed all the function fun_name() to func_name() and this script
>> is working fine. But when it comes to rwtest script I get this wierd
>> errors 
>>
>> rwtest: 215: 9: not found 
>> rwtest: 268: [[: not found
>> rwtest: 319: Syntax error: Bad substitution
>>
>> I went thru the test case for the utilities that are not supported and
>> found that typeset was the only one that was not supported. 
>>
>> typeset -i n=0 --> if i am not wrong this initializes the variable n
>> to zero and sets it to be a of type integer. I replaced this with n=0
>> which only does the initialization of the variable but no typesetting.
>> I am not sure to how far is it right, but I still get the above errors
>> after doing the change. 
>>
>> I am not looking at the option of patching the busybox to support
>> these utilities as of now, but more of changing this script to run on
>> busybox.
>>




More information about the busybox mailing list