bumps for laptop
This commit is contained in:
parent
81a8ca2b4e
commit
c49eed3c48
11 changed files with 39 additions and 22 deletions
9
scripts/mem
Executable file
9
scripts/mem
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
# Get the percentage of used memory and print it
|
||||
read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}')
|
||||
|
||||
percent=$(bc -l <<< "100 * $total / $used")
|
||||
|
||||
mem=$(awk -v u=$used -v t=$total -v p=$percent 'BEGIN {printf "%sMi/%sMi %.1f% ", t, u, p}')
|
||||
|
||||
echo $mem
|
Loading…
Add table
Add a link
Reference in a new issue