hi everyone,
im searching for a way to insert several values i get from a command [top |grep root |awk '{print $10}'] to a variable, so that the variable will contain the sum of all values returned.
(trying to calculate MEM usage by all root processes )
can anyone help?
p.s - why when i run that command i need to press q to get the result? and when i type:
ps -ef |grep root |awk '{print $10}'
it returns automatically?
thanx a lot !!
yair :))