#!/bin/sh A="echo 'hey' " # Hello A="$A | sed 's/hey/bye/'" # Bye eval $A