title: How to properly pass a $string with spaces into grep
body: <p>i tried to make bash script that can find "keyword" inside *.desktop file. my approach is to set some keyword as array, then pass it to grep, it work flawlessly until the keyword has at least two word separated by space.</p>
  
  <p>what it should be</p>
  
  <pre><code>cat /usr/share/applications/*.desktop | grep -i "Mail Reader"
  </code></pre>
  
  <p>what i have tried</p>
  
  <pre><code>search=$(printf 'Name=%s' "${appsx[$index]}")
  echo \""$search\"" #debug
  cat /usr/share/applications/*.desktop | grep -i $search
  </code></pre>
  
  <pre><code>search=$(printf 'Name=%s' "${appsx[$index]}")
  echo \""$search\"" #debug
  cat /usr/share/applications/*.desktop | grep -i \""$search\""
  </code></pre>
  
  <pre><code>search=$(printf '"Name=%s"' "${appsx[$index]}")
  echo $search #debug
  cat /usr/share/applications/*.desktop | grep -i $search
  </code></pre>
  
  <p>any suggestions is highly appreciated</p>