aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-05-22 23:39:43 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-05-22 23:39:52 +0200
commit605894a334f4edc8ccbf31f9a407e340837b1356 (patch)
tree684a87eaf40e5091ad143ba764713175473552dc
parentf62d5581db874678630717ff75ce45c6afef2e16 (diff)
Use [0-9] to be more portable
-rw-r--r--lib/subcommands/sysinfo.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/subcommands/sysinfo.bash b/lib/subcommands/sysinfo.bash
index bd6e414..4bceb42 100644
--- a/lib/subcommands/sysinfo.bash
+++ b/lib/subcommands/sysinfo.bash
@@ -17,8 +17,8 @@ subcommand() {
local uptime
# Set the variables which are compatible on every POSIX-compliant system
- storage_used="$(df | awk '/\d+/ { sum += $3 } END { print sum }')"
- storage_free="$(df | awk '/\d+/ { sum += $4 } END { print sum }')"
+ storage_used="$(df | awk '/[0-9]+/ { sum += $3 } END { print sum }')"
+ storage_free="$(df | awk '/[0-9]+/ { sum += $4 } END { print sum }')"
storage_total=$(( storage_used + storage_free ))
# And do platform-specific magic