linux flow control exit to terminal on failure
I have a query with flow control. I want to exit the script to terminal when message is " HOSTNAME NOT ADDED IN /tmp/hosts EXITING", which is failure message.
Code:
if grep -o 'abcdefgh01.was.db.dcbc' /tmp/hosts; then Thanks |
This won't work and is the reason why it doesn't exit properly:
Code:
if Code:
if grep -q 'abcdefgh01.was.db.dcbc' /tmp/hosts Code:
( if grep -q 'abcdefgh01.was.db.dcbc' /tmp/hosts |
I am curious on just how many times the OP is going to ask the same question??
october - http://www.linuxquestions.org/questi...ng-4175482373/ november - http://www.linuxquestions.org/questi...on-4175485133/ And now it would appear that we couldn't wait for december to roll around? You do know that if you keep doing the same things and expecting the outcome to change that this would be considered a sign of insanity |
All times are GMT -5. The time now is 08:02 PM. |