shell script nested if