regarding Q1:
if your shell supports getopts - I suggest you have a look at it (man getops). Otherwise you will need to write a small shell parsing code. (use $# shell variable that reports the amount of arguments passed to shell script).
regarding Q2:
I would use the following shell code:
expr ${VALUE} + 1 2>/dev/null
if [ $? -eq 0 ]
then
echo "Integer value"
else
echo "String value"
fi
Regarding Q2, this depends on which shell you are using. It also depends on what an integer is. If 123 +456 -789 all count as integers, and if we are using ksh, I am fond of:
#! /usr/bin/ksh
while (($#)) ; do
if [[ $1 = ?(+|-)+([0-9]) ]] ; then
echo $1 is an integer
fi
shift
done
exit 0
Regarding Q3: I meant to replace values ms1 and ms2 with ms3 and ms4.
Using sed or awk, I can assign same value to ResourceID. I couldnt figure out how I can assign different values.