It works. Thanks a lot.
I truly appreciate your help.
Regards,
Jay
---------- Post updated at 11:55 AM ---------- Previous update was at 11:45 AM ----------
One more question,
In my script sometimes value of variable test4 is empty.
because of that I get following.
##
ParseLog.sh[37]: 0.00%: more tokens expected
##
Can you provide me small script, with following info.
if $test value is empty or $test value is 12s( any numeric ) or $tet value is 32h ( any numeric instead of 32 ) , ignore.
If $test value is 15m ( any numeric ) I should do echo $(test%m).
#/bin/sh
if [ -z "$test4" ]
then
echo test4 is empty
else
echo test4 is "$test4"
fi
test4=32m
test4=${test4%m}
if [ -z "$test4" ]
then
echo test4 is empty
else
echo test4 is "$test4"
fi
#/bin/sh
if [ "$test4" == "" ]
then
echo test4 is empty
else
echo test4 is "$test4"
fi
test4=32m
test4=${test4%m}
if [ "$test4" == "" ]
then
echo test4 is empty
else
echo test4 is "$test4"
fi
#/bin/sh
typeset -R1 lchar
test4=32m
lchar=$test4
echo test4 is $test4
echo lchar is $lchar
case $lchar in
m)
echo lchar is m
;;
h|s)
echo lchar is h or s
;;
"")
echo lchar is empty? how can this be?
;;
esac