bash: Filter out #-leading lines in tsselect
This commit is contained in:
parent
25182187ae
commit
4e844fecf2
|
@ -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)")
|
||||
|
|
Loading…
Reference in New Issue