Nokia-N900-02-8:/etc/network# vi detectUsb.test.sh
#!/bin/sh
my="abcd"
if [[ $my = *bc* ]]
then
echo "Ok"
else
echo "Not ok"
fi
~
~
Nokia-N900-02-8:/etc/network# ./detectUsb.test.sh
Not ok
Nokia-N900-02-8:/etc/network#
Nokia-N900-02-8:/etc/network# vi detectUsb.sh
#!/bin/sh
my=`/sbin/ifconfig`
if [ `echo $my | grep RUNNING` ]
then
echo "Ok"
else
echo "Not ok"
fi
Nokia-N900-02-8:/etc/network# ./detectUsb.sh
sh: Link: unknown operand
Not ok
Nokia-N900-02-8:/etc/network# vi detectUsb.sh
#!/bin/sh
my=`/sbin/ifconfig`
if [ `echo $my | grep RUNNING` ]
then
echo "Ok"
else
echo "Not ok"
fi
Nokia-N900-02-8:/etc/network# ./detectUsb.sh
sh: Link: unknown operand
Not ok