title: Removing duplicates on a variable without sorting
body: <p>I have a variable that contains the following space separated entries.</p>
  
  <pre><code>variable="apple lemon papaya avocado lemon grapes papaya apple avocado mango banana"
  </code></pre>
  
  <p>How do I remove the duplicates without sorting?</p>
  
  <pre><code>#Something like this.
  new_variable="apple lemon papaya avocado grapes mango banana"
  </code></pre>
  
  <p>I have found somewhere a script that accomplish removing the duplicates of a variable, but does sort the contents.</p>
  
  <pre><code>#Not something like this.
  new_variable=$(echo "$variable"|tr " " "\n"|sort|uniq|tr "\n" " ")
  echo $new_variable
  apple avocado banana grapes lemon mango papaya
  </code></pre>