summaryrefslogtreecommitdiff
path: root/roles/install_fastd/files/fastd_grep.sh
diff options
context:
space:
mode:
authorNiklas Yann Wettengel <niyawe@niyawe.de>2020-11-08 20:43:00 +0100
committerNiklas Yann Wettengel <niyawe@niyawe.de>2020-11-08 20:43:00 +0100
commitf8dbb9f9886446a7df2678c3105ec28ce995eef2 (patch)
tree74bf0534d0cf4dcbeed80160c568f0ae75d53402 /roles/install_fastd/files/fastd_grep.sh
parent2874a4583ea55a754c30d929cb849fa104a46027 (diff)
fastd grep script
Diffstat (limited to 'roles/install_fastd/files/fastd_grep.sh')
-rw-r--r--roles/install_fastd/files/fastd_grep.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/install_fastd/files/fastd_grep.sh b/roles/install_fastd/files/fastd_grep.sh
new file mode 100644
index 0000000..37f5118
--- /dev/null
+++ b/roles/install_fastd/files/fastd_grep.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for file in /run/ff*.socket
+do
+ echo $file
+ nc -U $file | jq -r '.peers | keys[] as $k | "\(.[$k] | .connection.mac_addresses[]) \(.[$k] | .address) \($k)"' | grep $1
+done