littleIdiot
MIS
Hi,
I am in the middle of a script and need to check if one of my variables has numbers in it.
I tried explaing why but it didn;t makes sense so hopefully just pasting my code will explain in itself:
I hope that makes some sense.
How do I get this to work?
There could be one or two numbers.
Thanks,
littleIdiot
I am in the middle of a script and need to check if one of my variables has numbers in it.
I tried explaing why but it didn;t makes sense so hopefully just pasting my code will explain in itself:
Code:
#FIELD5 and DC are text variables
# check if FIELD5 is DC.1.rode, DC.2.rode etc
if [ $FIELD5 = ${DC}.[0-9].rode ]
then
#do stuff
else
#do other stuff
fi
I hope that makes some sense.
How do I get this to work?
There could be one or two numbers.
Thanks,
littleIdiot