linux if_else
#!/bin/bash
read -p "input:" yn
if [ $yn == 'y' ]; then
echo "yes"
exit 0
fi
if [ $yn == 'n' ]; then
echo "no"
exit 0
fi
if_elif_else_fi
#!/bin/bash
read -p "input:" yn
if [ $yn == 'y' ]; then
echo "yes"
exit 0
elif
[ $yn == 'n' ]; then
echo "no"
exit 0
else
echo "error"
fi
exit 0