I'm trying to execute a command inside a bash script, $(pwd) is not being interpreted at all, and not even using eval.This do not work:cat apache-vhost.conf | sed 's/{path}/$(pwd)/g'Neither does this:eval cat apache-vhost.conf | sed 's/{path}/$(pwd)/g'How can this be solved?
Commands inside bash not being interpreted?
shell;sed;quoting;command substitution
You are using single quotes in your sed expression which would prevent variable expansion.  Use double quotes.  Moreover, use a different separator than /:sed s|{path}|$(pwd)|g apache-vhost.confMoreover, cat file | sed is a useless use of cat.