title: Perform processing on string delimited list
body: <p>I have three sets of string delimited variables that look like this:</p>
  <pre><code>listNames=&quot;tom~susan~stafano~isabella&quot;
  listAges=&quot;23~45~34~10&quot;
  listNationality=&quot;british~american~italian~spanish&quot;
  </code></pre>
  <p>I also have a target variable to remove in those lists, i.e.</p>
  <pre><code>targetName=&quot;susan&quot;
  </code></pre>
  <p>If target name is &quot;susan&quot;, then I want the index of the element to be removed across all of the variables, so it ends up looking like this. Please note that I mean &quot;index&quot; in a position of certain substrings within a larger string, not in the traditional sense where it is associated with arrays:</p>
  <pre><code>listNames=&quot;tom~stafano~isabella&quot;
  listAges=&quot;23~34~10&quot;
  listNationality=&quot;british~italian~spanish&quot;
  </code></pre>
  <p>How can I implement this in Bash? Especially as I need to retain the variables in string format as above (and not convert them to explicit array structures, as they get passed into another script in the above format).</p>