using cut
i want to cut
MemTotal: 254788 kB into 254788 can someone help me with that |
Code:
echo "MemTotal: 254788 kB" | cut -c 11-16 Cheers, Josh |
I would use
Code:
~$ echo 'MemTotal: 254788 kB' | cut -d ' ' -f 2 |
aaa.. i want to cut it without using echo.
if i use cat /proc/meminfo | grep MemTotal | cut -d : -f2 254788 kB will shown and i also want to remove the kB |
Quote:
|
Quote:
Code:
~$ cat /proc/meminfo | awk '/MemTotal/ {print $2}' Quote:
|
Quote:
|
Quote:
;) |
All times are GMT -5. The time now is 07:58 AM. |