shell script while two conditions