summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-07 19:57:05 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-07 19:57:05 -0500
commit0c56800fc3bdbe8f3965a56f246f165a62ea1d1d (patch)
tree33c5e07e14bf1f984c29f39488513f5b0eb1da5e /.local
parent1e6ea1f25b941f51f9671df5ed24520c6b8ad9fd (diff)
rbar: be more compact
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/iwdata8
1 files changed, 8 insertions, 0 deletions
diff --git a/.local/bin/iwdata b/.local/bin/iwdata
new file mode 100755
index 0000000..a631d6d
--- /dev/null
+++ b/.local/bin/iwdata
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+iwconfig "$1" |
+sed -r 's/ {2,}/\n/g' |
+sed -e '/^\s*$/d' -e 's/:\s*/=/' \
+ -e '1s/^/Interface=/' \
+ -e '2s/^/MAC Protocol=/' \
+ -e 's/^ESSID="\(.*\)"$/ESSID=\1/'