aboutsummaryrefslogtreecommitdiff
path: root/scp.sh
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2023-12-24 16:19:13 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2023-12-24 16:25:11 +0100
commitf2c745de664f8cc0592a66b0663bb2869e7f1467 (patch)
tree1bd02840bdf68d0b4a0c5fe8307c795e14d3ba3f /scp.sh
parentff111234882691d1678ffb3b8d4d2c95ed65e84f (diff)
downloadscripts-f2c745de664f8cc0592a66b0663bb2869e7f1467.tar.gz
scripts-f2c745de664f8cc0592a66b0663bb2869e7f1467.zip
showKingdom.sh now uses local files and other minor fixes.
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)"