Advertisement
sergio_educacionit

elif.sh

Jul 20th, 2024
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.24 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. numero=2
  4.  
  5. if [ $numero -eq 1 ]; then
  6.     echo "El número es 1"
  7. elif [ $numero -eq 2 ]; then
  8.     echo "El número es 2"
  9. elif [ $numero -eq 3 ]; then
  10.     echo "El número es 3"
  11. else
  12.     echo "El número no es 1, 2 ni 3"
  13. fi
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement