summaryrefslogtreecommitdiff
path: root/.config/bash
diff options
context:
space:
mode:
Diffstat (limited to '.config/bash')
-rw-r--r--.config/bash/functions.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/.config/bash/functions.sh b/.config/bash/functions.sh
index ae7329b..c644247 100644
--- a/.config/bash/functions.sh
+++ b/.config/bash/functions.sh
@@ -232,3 +232,10 @@ die() {
echo " * ${*:-(no error message)}"
}
+wscan() {
+ local dev=$1
+ local pattern=$2
+
+ iw $dev scan | \
+ sed -e '/^[^\t]/{x;p;x;}' | sed -e '/./{H;$!d;}' -e "x;/$pattern/!d;" | sed "/^$/d"
+}