Home >
OS > The shell if judgment
A shell script if judgment
1. Use an interactive way of script
2. Prompt for height, the prompt weight
3. Calculate the bmi
4. The prompts for age, gender
5. According to age, gender of BMI value to distinguish the weight is what kind of conditions (three conditions)
Overweight obesity normal age
Female
7 18.9 & gt; BMI>=17.2 BMI>=18.9 BMI<17.2
8 19.9 & gt; BMI>=18.1 BMI>=19.9 BMI<18.1
Male
7 19.2 & gt; BMI>=17.4 BMI>=19.2 BMI<17.4
8 20.3 & gt; BMI>=18.1 BMI>=20.3 BMI<18.1