I'm hoping this is a simple question:
my script:
x="B1"
if [ "$x" = B* ]; then
echo B
else
echo M
fi
this doesn't work but hopefully you can see what i want to do - how do i get the if loop to recognize that the input contains the letter 'b' with out having to do:
if [ x = 1 ] || [ x = 2 ] || [ x = 3 etc.......
thanks
vidmo
my script:
x="B1"
if [ "$x" = B* ]; then
echo B
else
echo M
fi
this doesn't work but hopefully you can see what i want to do - how do i get the if loop to recognize that the input contains the letter 'b' with out having to do:
if [ x = 1 ] || [ x = 2 ] || [ x = 3 etc.......
thanks
vidmo