echo "${nodef1:-holahola}" echo "${nodef2:=holahola}" echo "${nodef2:2}" echo "${nodef2:2:3}" echo "${nodef1:?Error, nodef1 no definida}"
Tendrá como salida:
holahola holahola olahola ola p.sh: nodef1: Error, nodef1 no definida