i have written a code
Quote:
for x in $*
do
echo $x | grep "^[0-9]*$"
if [ $? -eq 0 ]
then
echo $?
fi
|
here in the above oode its searching for a number and displaying properly the value of $?
But problem is if the argument is a numeric one it displays the number also else its not dispalying
can any one exaplin why so nd how can i rectify that?