From f806fefafbd7f3d08f5d4047579cfe9b5191c3a0 Mon Sep 17 00:00:00 2001 From: SabryTarek Date: Fri, 16 Apr 2021 13:49:26 +0000 Subject: [PATCH] add equivalent to bash command --- languages/bash.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/languages/bash.sh b/languages/bash.sh index df781ee..13213f5 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -192,6 +192,7 @@ declare -r # makes the variables read-only declare -x # marks the variables for export via the environment ${varname:-word} # if varname exists and isn't null, return its value; otherwise return word +${varname:word} # if varname exists and isn't null, return its value; otherwise return word ${varname:=word} # if varname exists and isn't null, return its value; otherwise set it word and then return its value ${varname:?message} # if varname exists and isn't null, return its value; otherwise print varname, followed by message and abort the current command or script ${varname:+word} # if varname exists and isn't null, return word; otherwise return null