title: sed: mass converting epochs amongst random other text
body: <p>Centos / Linux
  Bash</p>
  
  <p>I have a log file, which has lots of text in and epoch numbers all over the place.  I want to replace all epochs whereever they are into readable date/time. </p>
  
  <p>I've been wanting to this via sed, as that seems the tool for the job.  I can't seem to get the replacement part of sed to actually parse the variable(epoch) to it for conversion.  </p>
  
  <p>Sample of what I'm working with...</p>
  
  <pre><code>echo "Some stuff 1346474454 And not working" \
  | sed 's/1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/'"`bpdbm -ctime \&amp;`"'/g'
  Some stuff 0 = Thu Jan  1 01:00:00 1970 And not working
  </code></pre>
  
  <p>The bpdbm part will convert a supplied epoch variable into useful date.  Like this..</p>
  
  <pre><code>bpdbm -ctime 1346474454
  1346474454 = Sat Sep  1 05:40:54 2012
  </code></pre>
  
  <p>So how do i get the "found" item to be parsed into a command.  As i don't seem to be able to get it to work.  </p>
  
  <p>Any help would be lovely.  If there is another way, that would be cool...but i suspect sed will be quickest.</p>
  
  <p>Thanks for your time!</p>