Assign a number to variable
Hi,
I am working on getting the memory of my box and assigning it to a variable
I need commands to use both in linux and solaris box.
the problem i am facing is ,when try to assign the out of below , i am not able to do it
-bash-3.2$ sar -r 5 1
SunOS hostname 5.10 Generic_150400-16 sun4v 07/11/2015
00:42:17 freemem freeswap
00:42:22 373643 47222800
now i need to store the value 373643 (first value of the output) to a variable.....
Please suggest some ideas
|