diff options
| author | Mitchell Riedstra <mitch@Mitchells-MacBook-Air.local> | 2019-12-07 09:02:03 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2019-12-07 09:02:48 -0500 |
| commit | 5dc98357f380a586f82a5e8bf27d378665181418 (patch) | |
| tree | 49007cf1bfe363ac1e821d696a1d1ddc8ab4f290 /shell/utils | |
| parent | 701126f58307ebd4918b26ce705f3b5793741f36 (diff) | |
| download | dotfiles-5dc98357f380a586f82a5e8bf27d378665181418.tar.gz dotfiles-5dc98357f380a586f82a5e8bf27d378665181418.tar.xz | |
Update the _sys_load and _sys_uptime functions to work on latest MacOS
Diffstat (limited to 'shell/utils')
| -rw-r--r-- | shell/utils | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/utils b/shell/utils index 2c45194..49b1985 100644 --- a/shell/utils +++ b/shell/utils @@ -100,12 +100,12 @@ _sys_memory() { _sys_load() { # Works on BSD too, neat. - uptime | sed -re's/^.*load averages?: ([0-9]+\.[0-9]+).*$/\1/g' + uptime | sed -E 's/^.*load averages?: ([0-9]+\.[0-9]+).*$/\1/g' } _sys_uptime() { # Took awhile to figure out, but this works on BSD as well - uptime | sed -re's/^.*up[ ]+//g' -e's/^([^,]*),.*/\1/g' -e's/^([^ ]+)[ ]*(.).*/\1\2/g' + uptime | sed -E -e's/^.*up[ ]+//g' -e's/^([^,]*),.*/\1/g' -e's/^([^ ]+)[ ]*(.).*/\1\2/g' } |
