Execute a variable (Bash)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

In Bash, you can store commands in variables and then execute them. Appearantly, the prober way of doing so, is through a function [1]. However, you can also do it like $(...). Example:

params=(
	wp
	help
	post
	meta
	patch
	update
)

("${params[@]}")

Sources