SyntaxFix
Write A Post
Hire A Developer
Questions
Truncate the contents of a variable $ var="abcde"; echo ${var%d*} abc Make substitutions similar to sed $ var="abcde"; echo ${var/de/12} abc12 Use a default value $ default="hello"; unset var; echo ${var:-$default} hello