Commit f4ca906c authored by Peter Kovary's avatar Peter Kovary
Browse files

Fix whereisthatquy

parent 1b3d636c
......@@ -77,7 +77,7 @@ function process_output {
host=$1
found=$2
if [ "$all" = true ]; then
if [[ $found == *$username* ]]; then
if [[ ! -z "$found" ]] && [[ "$found" == *$username* ]]; then
if [ "$bare" = true ]; then
echo $host $found
else
......@@ -99,7 +99,7 @@ for host in ${hostlist[*]}
do
if ! [[ $exclusions =~ $host ]]
then
process_output $host "$(echo $(timeout -k 0.1 $timeout ssh $ssh_opts $host "$command_to_execute" 2>/dev/null) $host)" $all $bare $username &
process_output $host "$(timeout -k 0.1 $timeout ssh $ssh_opts $host "$command_to_execute" 2>/dev/null)" $all $bare $username &
fi
done
wait >/dev/null 2>&1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment