title: Bash: replace with alternating symbol
body: <p>I want to extract markdown from some sort of text (ulysses iii iCloud Text.txt file). The editor replaced all square brackets with the "OBJECT REPLACEMENT CHARACTER" <code>0xEF 0xBF 0xBC (efbfbc)</code> and I want to undo this operation. </p>
  
  <p>How can I substitute all odd occurrences with "[" and all others by "]".</p>
  
  <p>EDIT:</p>
  
  <p>As example I want to replace each occurrence of <code>x</code> to <code>[</code>or <code>]</code>:</p>
  
  <p><code>Some ￼xlinkx</code> -> <code>Some [link]</code></p>