I try to understant the if condition
log_daemon_msg () {
if [ -z "${1:-}" ]; then
return 1
fi
log_daemon_msg_pre "$@"
if [ -z "${2:-}" ]; then
echo -n "$1:" || true
return
fi
echo -n "$1: $2" || true
log_daemon_msg_post "$@"
}
what is mean "${1:-}" and "${2:-}"
Aucun commentaire:
Enregistrer un commentaire