aboutsummaryrefslogtreecommitdiff
path: root/bin/shoal
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-06-22 10:13:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-06-22 10:13:10 +1200
commitc83042d6701f275bd792fb15c889e780deddb14a (patch)
treecc6f6615267ce1ce8aae52e59477d8cea4dd8e73 /bin/shoal
parentRemove reference to GitHub dotfiles pages (diff)
downloaddotfiles-c83042d6701f275bd792fb15c889e780deddb14a.tar.gz
dotfiles-c83042d6701f275bd792fb15c889e780deddb14a.zip
Rename binscripts more tersely
Diffstat (limited to 'bin/shoal')
-rwxr-xr-xbin/shoal37
1 files changed, 0 insertions, 37 deletions
diff --git a/bin/shoal b/bin/shoal
deleted file mode 100755
index f503d858..00000000
--- a/bin/shoal
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-
-#
-# shoal(1) -- Print all the non-wildcard Host names (first one per line) from
-# an ssh_config(5) file, defaulting to $HOME/.ssh/config.
-#
-# Author: Tom Ryder <tom@sanctum.geek.nz>
-# Copyright: 2014
-# License: Public domain
-#
-
-# Start by assuming we should parse all hosts
-declare -i shoal
-shoal=1
-
-# Iterate through the config
-while read -r option value _ ; do
-
- # "### shoal" and "### noshoal" toggles parsing
- case $option in
- '###')
- case $value in
- noshoal)
- shoal=0
- ;;
- shoal)
- shoal=1
- ;;
- esac
- ;;
- 'Host')
- if ((shoal)) && [[ $value != *[^[:alnum:]_-]* ]] ; then
- printf '%s\n' "$value"
- fi
- ;;
- esac
-done < "${1:-$HOME/.ssh/config}"