763 B
763 B
{
Multifunctionele shell-syntax. Meer informatie: https://www.gnu.org/software/bash/manual/bash.html.
- Isoleer variabele namen:
echo ${{{HOME}work}}
- Breid reeksen uit:
echo {{{1..3}}} {{{a..c}}}{{{dir1,dir2,dir3}}}
- Controleer of
variabeleis ingesteld voordat tekst wordt geretourneerd:
echo ${{{variabele:+variabele is set and contains $variabele}}}
- Stel standaardwaarden in als
variabeleniet is ingesteld:
echo ${{{variabele:-default}}}
- Geef de lengte van
variabelein tekens:
echo ${{{#variabele}}}
- Geef een sliced string terug:
echo ${{{variabele:3:7}}}
- Breid een
variabelerecursief uit:
echo ${{{!variabele}}}
- Groepeer commando uitvoer:
{ {{commando1; commando2; ...}} } | {{ander_commando}}