how to write shell script using multiple if statement