[BusyBox] Issue with strings (1.00-pre10)
Tito
farmatito at tiscali.it
Wed Apr 14 14:52:03 UTC 2004
On Wednesday 14 April 2004 11:03, Ian Latter wrote:
> Hello,
>
> I put this off; I've seen the same issue in pre8,pre9 and pre10, but
> I've just confirmed the fix.
>
> In my distro, I have busybox running fine, except that;
>
> strings /README
> busybox strings /README
> cat /README | busybox strings
>
> (where README is a plain text file -- not at this is important)
> all produce "strings" output, except where inserted between
> the 4th and 5th chars are a dollar sign, yen sign and an at
> sign, on every row -- consistent across all builds in the past
> two months or so.
>
> The same binary on my RedHat9 dev box does not produce
> this error (just nice clean strings output)
>
> However, the strings buffer is n=4 (-1). Removing the
> comment on miscutils/strings.c line 70 (string[n]=`!
>
>
Hi Ian,
this works fine for me!!!
root at localhost:/dev/pts/1:/rep/busybox-1.00-pre8# ./busybox strings /README
Please see the LICENSE file for details on copying and usage.
snip
also this works
root at localhost:/dev/pts/1:/rep/busybox-1.00-pre8# ./busybox strings /README
Please see the LICENSE file for details on copying and usage.
snip
and this works too.
cat /README |./busybox strings -f
{standard input}: Please see the LICENSE file for details on copying and usage.
snip
Same thing for busybox-1.00-pre10.
Even if running an extensive test with the following script:
#!/bin/bash
# Test for files
a=0
echo "Testing Busybox strings applet vs real strings."
echo "Test n°1: strings -afo file."
for dir in /bin /sbin /usr/bin /usr/sbin
do
for i in `ls -1 $dir`
do
strings -af -t o $dir/$i > /tmp/out1.txt
./busybox strings -afo $dir/$i > /tmp/out2.txt
diff /tmp/out1.txt /tmp/out2.txt
if [ $? == 1 ] ; then
a=1
fi
done
done
if [ $a == 0 ] ; then
echo "PASSED"
else
echo "FAILED"
fi
a=0
echo "Test n°2: ls | strings -ao."
for dir in /bin /sbin /usr/bin /usr/sbin
do
for i in `ls -1 $dir`
do
ls -1 /bin/ | strings -a -t o > /tmp/out1.txt
ls -1 /bin/ | ./busybox strings -ao > /tmp/out2.txt
diff /tmp/out1.txt /tmp/out2.txt
if [ $? == 1 ]; then
a=1
fi
done
done
if [ $a == 0 ] ; then
echo "PASSED"
else
echo "FAILED"
fi
rm -f /tmp/out1.txt /tmp/out2.txt
#end of script
I cannot see differences with the output of the real strings program.
Testing Busybox strings applet vs real strings.
Test n°1: strings -afo file.
PASSED
Test n°2: ls | strings -ao.
PASSED
So it seems to me that there must be something different on your system (what do you use?).
Best regards and
Ciao,
Tito
More information about the busybox
mailing list