Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Description: Muestra el primero y último parámetro pasado sin hacer ningún bucle
- #Author:jMa
- if [ $# -eq 0 ]
- then
- echo "No has pasado ningún parámetro"
- elif [ $# -eq 1 ]
- then
- echo "Sólo hay un parámetro que es $1"
- else
- echo "El primer argumento es $1"
- echo -n "El último argumento es "
- eval "echo \${$#}"
- fi
Advertisement
Add Comment
Please, Sign In to add comment