-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Randall R Schulz wrote:
> On Tuesday 25 October 2005 09:09, Anders Johansson wrote:
>> On Tuesday 25 October 2005 17:59, Daniel Hatfield wrote:
>>>>> Is there a way to obtain the amount of physical memory
>>>>> installed in a system from within SuSE 10 console? This is for
>>>>> a script.
>>>> $ cat /proc/meminfo
>>>> MemTotal: 526525152 kB
>>>> [...]
>>>> $
>>> Or to be more specific:
>>> cat /proc/meminfo | grep MemTotal
>> Or to be even more specific
>> cat /proc/meminfo | grep MemTotal|awk '{print $2}'
> Or, to be more parsimonious:
> % grep -h MemTotal /proc/meminfo |awk '{print $2}'
> If I knew anything at all about awk, I'd know whether it could handle
> the selection (grep) part, too, but I don't.
Just for the record:
awk '/^MemTotal:/{print $2}' /proc/meminfo
cheers
- --
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\ <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
_\_v The more things change, the more they stay insane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFDXoyrr3NMWliFcXcRAlVBAJ4pP4WO8S4f6Gy/uRWyljiZpj4nOQCgom+x
LCL/B9eOqtZEjBNkgtiUBd8=
=JZpp
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]