Differences between the busybox shell and the real bourne shell

Feature Bourne Shell Busybox Shell Bash
Subprocess Execution “ (the backtick) “ or $() As Busybox
Math Evaluation use expr (not builtin) $(( )) As Busybox; adds ((var=math))
Constants None None typeset -r
Integers None None typeset -i
Evaluation [ [ [
Extended Evaluation /bin/[[ (1) /bin/[[ (1) [[


(1)
The [[ operator is not the same as the program /bin/[[ as a program you need to still use double quotes around the variables to be expanded; thus defeating the reason for having them in the first place.

For Example:

# file="/tmp/let me go"
# touch "$file"
# [[ -e $file ]] && echo "There"

Yields [Busybox]:

[[: me: unknown operand

– as $file is word split before handing it to the command [[

Yields :

There

– due to $file not being split when passed to the test -e.