Suppose I have a string like this:
blah=-Xms512m
I want the output as 512.
I know I can get it using grep on Linux like this:
echo $blah | grep -o -e [0-9]\\+
But this doesn't work on Solaris.
Any nice solutions so that it's compatible on both, Linux and Solaris? Or atleast on Solaris?