Bash: Run a command stored in a variable Get link Facebook X Pinterest Email Other Apps April 13, 2016 $ cmd = "echo foo{bar,baz}" $ $cmd foo { bar , baz } $ eval "$cmd" foobar foobaz Reference Read more