FMeinicke's Wiki

Home

❯

Linux

❯

Shells

❯

bash

❯

Scripting

❯

Run command stored in a string

Run command stored in a string

May 26, 20251 min read

  • bash/eval

eval

Source

  • https://unix.stackexchange.com/a/356536/482223
some_command="echo This is a test"
eval "${some_command}"

Graph View

Created with Quartz v4.5.0 © 2025

  • GitHub