Bash variable modifiers

The ${variable} syntax also supports a few of the standard bash modifiers as specified below:

  • ${variable:-word} indicates that if variable is set then the result will be that value. If variable is not set then word will be the result.
  • ${variable:+word} indicates that if variable is set then word will be the result, otherwise the result is the empty string. In all cases, word can be any string, including additional environment variables.

Igor Shymko

Igor Shymko
Lives and works in Kiev, Ukraine. Writes scala programs as full time job, enjoys good electronic music, tasty coffee, good mood, loves snowboarding!

GC roots

Understanding garbage collection Continue reading

Hylang

Published on February 01, 2019

Package by feature

Published on February 19, 2017