title: Using sed on xargs variable isn't working inside shell expansion
body: <p>I am attempting to do a batch key rename in Redis, using the shell to sed a replacement for each key name. (There doesn't seem to be a better way to do this in redis internally).</p>
  
  <pre><code>redis-cli -n 5 KEYS "*::staging::*"| xargs -I {} echo "RENAME {} $(echo {} | sed 's/staging/development/g')" 
  # Then pipe this command into redis-cli when working
  </code></pre>
  
  <p>I am expecting an output like this:
  <code>"RENAME redis::staging::key redis::development::key"</code></p>
  
  <p>Instead I just get this:
  <code>"RENAME redis::staging::key redis::staging::key"</code></p>
  
  <p>The <code>echo {} $(echo {}| sed 's/old/new/')</code> is what is hanging me up... 
  How does one properly achieve taking an <code>xargs</code> output and echo both the original and an edited version of that? <code>$(echo {} |sed)</code> should work, right? (If so, how can I do it correctly?)</p>