summaryrefslogtreecommitdiff
path: root/src/completion/list_protocols.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/completion/list_protocols.sh')
-rwxr-xr-xsrc/completion/list_protocols.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/completion/list_protocols.sh b/src/completion/list_protocols.sh
new file mode 100755
index 000000000..e9d50a70f
--- /dev/null
+++ b/src/completion/list_protocols.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+grep -v '^#' /etc/protocols | awk 'BEGIN {ORS=""} {if ($3) {print TRS $1; TRS=" "}}'