on Ubuntu 8.10 I would like to write bash script. From complex transformation I get variable command1 filled. I would like to execute command that is in variable command1.
But the last command returns error:Code:#!/bin/bash command1=$(echo ls -l) # Variable where some command is defined "$command1" # Execute command
line 3: ls -l: command not found
How to execute command that I already have in variable command1?