This filter is a page
Drawer: Parameters
What ${…} does to a variable before releasing it into the line.
11 insects on this page
- BSH-004 ${var:-padrão} If the variable is empty, the default takes over — without touching the variable. Parameters common
- BSH-005 ${var:=padrão} Like :-, but the default gets written into the variable. Parameters uncommon
- BSH-006 ${var:?erro} No value, and the script stops right there — with the message you chose. Parameters forgotten
- BSH-007 ${var:+alterno} The default's opposite: it only produces a value when the variable has one. Parameters forgotten
- BSH-008 ${#var} The value's length, counted in characters, with no helper process. Parameters uncommon
- BSH-009 ${var#prefixo} It gnaws at the start of the value: # takes the smallest bite, ## the largest. Parameters uncommon
- BSH-010 ${var%sufixo} It gnaws at the end of the value: % takes the smallest bite, %% the largest. Parameters uncommon
- BSH-011 ${var/velho/novo} Swaps one piece of the value for another; with a double slash, all of them. Parameters common
- BSH-012 ${var^^} Raises or lowers the case of the whole value — or just the first letter. Parameters uncommon
- BSH-013 ${!var} The variable that points at another: it expands the name stored inside it. Parameters forgotten
- BSH-014 ${var:2:5} A slice of the value: it starts at the offset, measures the length. Parameters uncommon