Changeset 142


Ignore:
Timestamp:
Dec 28, 2017, 5:04:18 PM (3 years ago)
Author:
g7moreau
Message:
  • Protect echo with "
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tssh/tssh

    r141 r142  
    143143            if host ${justhost} | grep -q 'not found'
    144144            then
    145                [ "${verbose}" == 'yes' ] && echo Warning: ${justhost} does not exists
     145               [ "${verbose}" == 'yes' ] && echo "Warning: ${justhost} does not exists"
    146146               continue
    147147            fi
     
    150150               if host ${justhost}.${dyn_domain} | grep -q 'not found' || ! nmap -p 22 -sT -PN ${justhost}.${dyn_domain} | grep -q '\bopen\b'
    151151               then
    152                   [ "${verbose}" == 'yes' ] && echo Warning: ${justhost} is down
     152                  [ "${verbose}" == 'yes' ] && echo "Warning: ${justhost} is down"
    153153                  continue
    154154               else
    155                   [ "${verbose}" == 'yes' ] && echo Warning: remove ssh key of ${justhost}.${dyn_domain}
     155                  [ "${verbose}" == 'yes' ] && echo "Warning: remove ssh key of ${justhost}.${dyn_domain}"
    156156                  host=${justhost}.${dyn_domain}
    157157                  ssh-keygen -q -R $(LANG=C host ${justhost} | awk '{print $4}')
     
    159159            fi
    160160         fi
    161          [ "${verbose}" == 'yes' ] && echo Warning: add ${host} on list with mode ${mode}
     161         [ "${verbose}" == 'yes' ] && echo "Warning: add ${host} on list with mode ${mode}"
    162162         echo "${host}" >> "/tmp/${base_path}/master${mode}"
    163163      else
    164164         # cluster, jump in a recursive mode
    165          [ "${verbose}" == 'yes' ] && echo Warning: recursive call for cluster ${justhost} (${cluster}), with mode ${mode}
     165         [ "${verbose}" == 'yes' ] && echo "Warning: recursive call for cluster ${justhost} (${cluster}), with mode ${mode}"
    166166         cluster=$(get_host_list --mode=${mode} "${cluster}")
    167167      fi
     
    191191   if [ "${verbose}" == 'yes' ]
    192192   then
    193       echo Info: next hosts to be splitted
     193      echo "Info: next hosts to be splitted"
    194194      cat "/tmp/${base_path}/${f}" | sed -e 's/^/  /;'
    195195      sleep 5
Note: See TracChangeset for help on using the changeset viewer.