#!/system/bin/shThe same script can run well on Linux.
if [ $? eq 0 ]; then
echo "Command run successful"
fi
I dont know why, but I finally got a solution.
Upload a busybox, change it to executable permissions, create a soft link "[" to busybox. Like the following:
-rwxr-xr-x 500 500 1877260 2011-09-22 02:42 busyboxRun the sh script again, which shall give no error any more.
lrwxrwxrwx root root 2011-09-26 08:15 [ -> /sbin/busybox
Finally, make sure the searching path $PATH can find command "busybox", and "[".
No comments:
Post a Comment