I am trying to store the start of a sed command inside a variable like this:
sedcmd=\"sed -i \'\' \"
Later I then execute a command like so:
Why not use an alias or a function? You can do alias as
alias sedcmd="sed -i '' "