Thank you very much CowboyFromHell, The example you posted works well, but when I tried to adapt it a bit to my needs, I have an odd error : Code: 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 Could you help me out on this one? I am a big bash / sh noob.
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