vendredi 2 janvier 2015

Complex script: do an action if condition is meet



#!/usr/bin/bash
array1=(
HPUX2
HPUX3
)

array2=(
`cat $HOME/testo |awk '{print $2}'`
)


The file testo,report



HPUX2 OFF
HPUX3 ON


I want my script report "Machine HPUX2 is OFF" and machine HPUX3 is ON,if ON script run ping.


Someone know how to do?Thanks



Aucun commentaire:

Enregistrer un commentaire