Forum Discussion
1 Reply
Sort By
- Jeff_Nguyen_449Nimbostratus
this is what i got so far.
' if user does not provide correct amount of arugments, show them correct way to run it and end program. '
' run adtest command. $1 is the host, $2 is the username. both are read from the command line '
' if you want to see full output of the command, uncomment the following section '
' if the output contains the key_msg ("succ_cnt=1"), then UP, else DOWN '
echo "${OUTPUT}" | grep -q "$key_msg" && echo "UP" || echo "DOWN"