fixed conditionals.

This commit is contained in:
ofilter 2022-03-30 01:58:07 +02:00
parent 97ebf895bb
commit 81e389e6ba
2 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ sed '/^$/d' h | tee ./.curr_h >/dev/null # remove empty lines
printf "Attempting to SSH\n"
if [[ -z "$_USERS" ]]
if [[ "$_USERS" ]]
then
for username in $_USERS
do
@ -59,7 +59,7 @@ fi
# Stores results in ./.proxy_results
printf "" >.proxy_results
if [[ -z "$_PROXY_ROUTES" ]]
if [[ "$_PROXY_ROUTES" ]]
then
for proxy in $_PROXY_ROUTES
do
@ -103,7 +103,7 @@ mv .curr_h .discards_h
# Print Result
printf "Printing results:\n"
if [[ -z "$_USERS" ]]
if [[ "$_USERS" ]]
then
for username in $_USERS
do

View File

@ -24,7 +24,7 @@ _SSH_TIMOUT=7
printf "Sending files to /tmp\n"
if [[ -z "$_USERS" ]]
if [[ "$_USERS" ]]
then
for username in $_USERS
do
@ -52,7 +52,7 @@ fi
# Copy files to proxy host
PROXY_IN_RESULTS=$(awk -F ';' '{print $2}' ./.proxy_results | sort | uniq)
if [[ -z "$PROXY_IN_RESULTS" ]]
if [[ "$PROXY_IN_RESULTS" ]]
then
for _proxy in $PROXY_IN_RESULTS
do
@ -80,7 +80,7 @@ printf "Sending files from proxy hosts\n"
# Copy files from proxy to remote
PROXY_SORTED_LINES=$(sort -t ';' -k2 ./.proxy_results)
if [[ -z "$PROXY_SORTED_LINES" ]]
if [[ "$PROXY_SORTED_LINES" ]]
then
while IFS= read -r _LINE
do