DEV Community 👩‍💻👨‍💻

Roy
Roy

Posted on

get available memory in gb using single bash shell command

awk '/MemFree/ { printf "%.3f \n", $2/1024/1024 }' /proc/meminfo

Enter fullscreen mode Exit fullscreen mode

https://stackoverflow.com/a/34938001/4016028

Top comments (0)

Regex for lazy developers

regex for lazy devs

You know who you are. Sorry for the callout 😆