Using single quotes for command substitution results in treating the command as a literal string instead of executing it. To fix this, replace single quotes with '$(..)' for proper command substitution and execution.