diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2019-12-15 23:01:28 +0100 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2019-12-15 23:01:28 +0100 |
commit | b8d66986e9be6711ed42f0b75de3af2e1f4a632d (patch) | |
tree | 067c400b6fffa7022a021e3db6f9d80be7b9d9a6 /scp.sh | |
parent | c3ffbbe252e07d7dd4161039dcaf8cb02e05e202 (diff) | |
download | scripts-b8d66986e9be6711ed42f0b75de3af2e1f4a632d.tar.gz scripts-b8d66986e9be6711ed42f0b75de3af2e1f4a632d.zip |
ssh.sh and scp.sh now don't show blank options.
Diffstat (limited to 'scp.sh')
-rwxr-xr-x | scp.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2,7 +2,7 @@ # Allows to select a host to send files to through scp hostsfile="$HOME/.hosts" -hostnames="$(sed '/^#.*$/d' < "$hostsfile" | cut -d'#' -f1 | fzf)" || exit 0 +hostnames="$(sed '/^#.*$/d; /^$/d' < "$hostsfile" | cut -d'#' -f1 | fzf)" || exit 0 host="$(grep "$hostnames" < "$hostsfile")" hostname="$(echo "$host" | cut -d'#' -f1)" hostaddress="$(echo "$host" | cut -d'#' -f2)" |