aboutsummaryrefslogtreecommitdiff
path: root/scp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scp.sh')
-rwxr-xr-xscp.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scp.sh b/scp.sh
index bf05ce0..82161be 100755
--- a/scp.sh
+++ b/scp.sh
@@ -3,7 +3,7 @@
hostsfile="$HOME/.hosts"
host="$(sed '/^#/d; /^\s*$/d' "$hostsfile" | cut -d'#' -f1 | fzf)" || exit 0
-hostline="$(grep "^${host}" "$hostsfile")"
+hostline="$(grep "^${host}#" "$hostsfile")"
hostname="$(echo "$hostline" | cut -d'#' -f1)"
hostaddress="$(echo "$hostline" | cut -d'#' -f2)"
hostport="$(echo "$hostline" | cut -d'#' -f3)"