Diapositivas y scripts de taller 1
This commit is contained in:
8
taller1/scripts/06.sh
Normal file
8
taller1/scripts/06.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# ¡Muy importante seguir los espacios en el if!
|
||||
if [[ -z $1 ]]; then
|
||||
echo "No hay parámetro"
|
||||
exit 1 # salir de script, 1 = error
|
||||
fi
|
||||
greeting=$1
|
||||
echo "Hello $greeting"
|
||||
Reference in New Issue
Block a user