mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-30 03:35:37 +02:00
716 B
716 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
variable
is ingesteld voordat tekst wordt geretourneerd:
echo ${variable:+variable is set and contains $variable}
- Stel standaardwaarden in als
variable
niet is ingesteld:
echo ${variable:-default}
- Geef de lengte van
variable
in tekens:
echo ${#variable}
- Geef een sliced string terug:
echo ${variable:3:7}
- Breid een
variable
recursief uit:
echo ${!variable}
- Groepeer commando uitvoer:
{ {{commando1; commando2; ...}} } | {{ander_commando}}