title: Change delimiter in string type of variable in bash
body: <p>I have small task.</p>
  
  <p>I should write:</p>
  
  <pre><code>data="duke,rock,hulk,donovan,john"
  </code></pre>
  
  <p>And in the next variable, i should change delimiter of first variable.</p>
  
  <pre><code>data2="duke|rock|hulk|donovan|john"
  </code></pre>
  
  <p>What is the correct way to do this on bash ?</p>
  
  <p>This is a small part of script, what i should do.</p>
  
  <p>For example, i use construction "WHILE-GETOPS-CASE" to use usernames in parameter for excluding them.</p>
  
  <pre><code>ls /home/ | egrep -v $data2
  </code></pre>