#!/usr/bin/ksh test1() { eval sed -e $1 testfile > testfile2 } test1 "'1s/.*/test /'" #test1 "'1s/.*/ '$(tput smso)'broken'$(tput rmso)' /'"