aboutsummaryrefslogtreecommitdiff
path: root/modules/ram
blob: a2e359b499d7f40e93787fb0791bd5b94c64541a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# Prints the total ram and used ram in Mb

PREFIX='﬙ '

get_ram()
{
    TOTAL_RAM=$(free -m | awk  {'print $2'} | head -n 2 | tail -1)
    FREE_RAM=$(free -m | awk  {'print $3'} | head -n 2 | tail -1)
    MB="MB"

    echo "$PREFIX$FREE_RAM/$TOTAL_RAM$MB"
}

get_ram