lib/ssh.sh in forj-0.0.36 vs lib/ssh.sh in forj-0.0.37

- old
+ new

@@ -17,11 +17,11 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -OW=`date +%Y-%m-%d.%H%M%S` +NOW=$(date +%Y-%m-%d.%H%M%S) logpath=~/.ssh/ DB=~/hosts #key_path=~/.ssh/ #key_path=~/.hpcloud/keypairs/ init_config=~/ssh_init @@ -138,10 +138,10 @@ ip=$(cat $DB | grep -iE "[a-ZA-Z]+\.$id" | grep -i $node | awk '{print $2}' | tr -d ' ') if [ "$ip" == "" ]; then echo -e "${RED}Error, the kit ${GRE}$node${RED} with id ${GRE}$id${RED} was not found.${RST}" exit 1 fi - key=$(cat $DB | grep -iE "$ip" | awk '{print $4}' | tr -d ' ') + key=$(cat $DB | grep -iEw "$ip" | awk '{print $4}' | tr -d ' ') message="$node.$id" extended="($ip)" if [ "$ip" == "" ] || [ "$key" == "" ]; then echo -e "${RED}Error, combination was not found, maybe you should update the db.$RST" \ No newline at end of file