From cec6026bcb326f73310213f4fb958619a045c37f Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Thu, 23 May 2019 13:32:14 +0200 Subject: Changed ssh.sh and scp.sh to allow for comments on hosts file. --- ssh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ssh.sh') diff --git a/ssh.sh b/ssh.sh index d049de1..50d801f 100755 --- a/ssh.sh +++ b/ssh.sh @@ -4,7 +4,7 @@ # Port and input for pass are optional hostsfile="$HOME/.hosts" -hostnames="$(cut -d'#' -f1 < "$hostsfile" | fzf)" +hostnames="$(sed '/^#.*$/d' < "$hostsfile" | cut -d'#' -f1 | fzf)" host="$(grep "$hostnames" < "$hostsfile")" hostname="$(echo "$host" | cut -d'#' -f1)" hostaddress="$(echo "$host" | cut -d'#' -f2)" -- cgit v1.2.1