mirror of
https://github.com/Qubes-Community/Contents.git
synced 2025-01-03 11:31:04 -05:00
use only awk to display the result
This commit is contained in:
parent
df0532c5c7
commit
c59eb7db01
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
# Initial version 03.04.18 by https://github.com/one7two99
|
# Initial version 03.04.18 by https://github.com/one7two99
|
||||||
#
|
#
|
||||||
ram_sum="("$(xl list | awk '{print $3}' | tail -n +2 | paste -s -d+ -)")/1000"
|
xl list | awk '
|
||||||
ram_sum=$(bc <<< "scale=1;$ram_sum")
|
BEGIN { mem=0; qubes=0; }
|
||||||
qubes_sum=$(xl list 2> /dev/null | tail -n +2 | wc -l)
|
/ [0-9]+ +[0-9]+ +[0-9]+ / { mem+=$3; qubes++; }
|
||||||
echo $qubes_sum"Q|"$ram_sum"G"
|
END { printf("%dQ|%.1fG\n", qubes, mem/1000); }'
|
||||||
|
Loading…
Reference in New Issue
Block a user