title: Use of bash program with argument inside a sed
body: <p>I have a small SED question to ask you.
  But first of all, I know there are other ways to do what I want (I've already made a small python script to do that), but for my own curiosity, I'd like to know if there is a way to do that with SED.</p>
  
  <p>So, e.g. : here is a CSV file like :</p>
  
  <pre><code>12345678,yan solo
  23456789,luke skywalker
  34567890,leia organa
  </code></pre>
  
  <p>And here is a bash script named "SOMESCRIPT", which will transform a argument in something else.  E.g. : </p>
  
  <pre><code>~$ ./SOMESCRIPT 12345678
  abcd
  </code></pre>
  
  <p>So, what I'd like to di is : use that script from inside a SED to regenerate the CSV with converted value.</p>
  
  <p>Here an example of output :</p>
  
  <pre><code>abcd,yan solo
  efgh,luke skywalker
  ijkl,leia organa
  </code></pre>
  
  <p><strong>Some thinkings :</strong></p>
  
  <pre><code>~$ cat somecsv.csv | sed "s/\(.*\),/\1/g"
  </code></pre>
  
  <p><em>--> The regex catch the part to be transformed and save it to the stack in \1</em></p>
  
  <pre><code>~$ cat somecsv.csv | sed "s/\(.*\),/`SOMESCRIPT `\1/g"
  </code></pre>
  
  <p><em>--> For each line, SOMESCRIPT is executed, but before the printing of \1</em></p>
  
  <pre><code>~$ cat somecsv.csv | sed "s/\(.*\),/`SOMESCRIPT \1`/g"
  </code></pre>
  
  <p><em>--> For each line, SOMESCRIPT is executed, but \1 is not recognized as a shell variable</em></p>
  
  <p><strong>So, basicaly, the question is : is it possible to pass the stack value \1 as a shell argument to SOMESCRIPT ?</strong></p>