bash: Filter out #-leading lines in tsselect

This commit is contained in:
Peter Cai 2022-09-22 22:30:24 -04:00
parent 25182187ae
commit 4e844fecf2
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,8 @@ function tsselect() {
local items=()
local hostnames=()
while read -r line; do
[ -z "$line" ] && continue
[[ "$line" =~ ^\# ]] && continue
local name=$(echo "$line" | awk '{ print $2 }')
local ip=$(echo "$line" | awk '{ print $1 }')
items+=("$name ($ip)")