Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- read -p "How about your Height(cm)?" height
- read -p "How about your Weight(kg)?" weight
- echo "your height is $height cm"
- echo "your weight is $weight kg"
- BMI=`echo "$height $weight" | awk '{print $2/(($1/100)*($1/100))}'`
- echo "---------Result---------"
- bash bbb.sh ${BMI}
- > ls
- bbb.sh main.sh
- > bash main.sh
- How about your Height(cm)?168
- How about your Weight(kg)?52
- your height is 168 cm
- your weight is 52 kg
- ---------Result---------
- “your bmi is 18.424”
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement