title: sub and gsub function?
body: <p>I have this command:</p>
  
  <pre><code>$ find $PWD -name "*.jpg" | awk '{system( "echo "  $(sub(/\//, "_")) ) }'
  _home/mol/Pulpit/test/1.jpg
  </code></pre>
  
  <p>Now the same thing, but using gsub:</p>
  
  <pre><code>$ find $PWD -name "*.jpg" | awk '{system( "echo "  $(gsub(/\//, "_")) ) }'
  
  mol@mol:~
  </code></pre>
  
  <p>I want to get the result:</p>
  
  <pre><code>_home_mol_Pulpit_test_1.jpg
  </code></pre>
  
  <p>Thank you for your help.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I put 'echo' to test the command:</p>
  
  <pre><code>$ find $PWD -name "*.jpg" | awk '{gsub("/", "_")} {system( "echo " mv $0 " " $0) }'
  _home_mol_Pulpit_test_1.jpg _home_pic_Pulpit_test_1.jpg
  
  mol@mol:~
  </code></pre>
  
  <p>I want to get the result:</p>
  
  <pre><code>$ find $PWD -name "*.jpg" | awk '{gsub("/", "_")} {system( "echo " mv $0 " " $0) }'
  /home/pic/Pulpit/test/1.jpg  _home_pic_Pulpit_test_1.jpg
  </code></pre>