1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-18 05:40:07 +00:00

Grep statement simplified.

This commit is contained in:
Dominik Ritter 2015-08-26 18:26:53 +02:00
parent fccc3d5e64
commit 730697893e

View file

@ -571,7 +571,7 @@ prompt_ip() {
prompt_load() { prompt_load() {
if [[ "$OS" == "OSX" ]]; then if [[ "$OS" == "OSX" ]]; then
load_avg_5min=$(sysctl vm.loadavg | grep -o -E -e '[0-9]+\.[0-9]+' | head -n 1) load_avg_5min=$(sysctl vm.loadavg | grep -o -E '[0-9]+\.[0-9]+' | head -n 1)
ramfree=$(vm_stat | grep "Pages free" | grep -o -E '[0-9]+') ramfree=$(vm_stat | grep "Pages free" | grep -o -E '[0-9]+')
# Convert pages into Bytes # Convert pages into Bytes
ramfree=$(( $ramfree * 4096 )) ramfree=$(( $ramfree * 4096 ))