diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-03-27 20:21:26 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-03-30 01:46:40 -0700 |
commit | a44b251305dd6c14860d91fd3dfba3783013cf0f (patch) | |
tree | 1970ca5d7953204e9f3b3879ca54380905d2981b /home/xyz/.local/bin/mrt | |
parent | c68d8eec6e596b6901d9f9a78041cd113fbbbb00 (diff) |
awk better style
Diffstat (limited to 'home/xyz/.local/bin/mrt')
-rwxr-xr-x | home/xyz/.local/bin/mrt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/home/xyz/.local/bin/mrt b/home/xyz/.local/bin/mrt index dc6435f2..883ab8f0 100755 --- a/home/xyz/.local/bin/mrt +++ b/home/xyz/.local/bin/mrt @@ -27,7 +27,8 @@ mullvad relay update # https://stackoverflow.com/a/17988834/9008720 for relay in $(mullvad relay list | awk -v location="$location" ' $0 ~ location {f=1;next} -/^\t[[:alpha:]]/ {f=0} f { +/^\t[[:alpha:]]/ {f=0} +f { if($5 == "WireGuard,") print $1 }'); do |