How can I execute a command stored in a variable?

Unix shells operate a series of transformations on each line of input before executing them. For most shells it looks something like this (taken from the Bash man page): initial word splitting brace expansion tilde expansion parameter, variable and arithmetic expansion command substitution secondary word splitting path expansion (aka globbing) quote removal Using $cmd directly … Read more