title: how to concatenate a long git command, with string from file?
body: <p>I want to do a git search for keyword across several files.
  the file list will be provided from another file($3 or &quot;${filesStr[@]}&quot;).</p>
  <p>bellow is gsearch.sh</p>
  <pre><code>filesStr=($(&lt; $3))
  git log --binary \
      --ignore-all-space \
      --ignore-blank-lines \
      --ignore-cr-at-eol \
      --ignore-space-at-eol \   
      --ignore-space-change \
      -p -G $1 -- &quot;${filesStr[@]}&quot; &gt; &quot;$2&quot;
  </code></pre>
  <p>I would run it in this way:</p>
  <pre><code>./gsearch.sh GitSearch ~/loadrc/gitsearch.findresult ~/loadrc/gitsearch.findresult.tmp
  </code></pre>
  <p>~/loadrc/gitsearch.findresult.tmp</p>
  <pre><code>vimrc/.vim/plugin/keymap.vim
  vimrc/.vim/plugin/common.vim
  </code></pre>
  <p>But I got nothing in <code>~/loadrc/gitsearch.findresult</code></p>
  <p>if I add <code>echo</code> to <code>gsearch.sh</code> like this:</p>
  <pre><code>filesStr=($(&lt; $3))
  echo git log --binary \
           --ignore-all-space \
           --ignore-blank-lines \
           --ignore-cr-at-eol \
           --ignore-space-at-eol \
           --ignore-space-change \
           -p -G $1 -- &quot;${filesStr[@]}&quot; &gt; &quot;$2&quot;
  </code></pre>
  <p>then <code>~/loadrc/gitsearch.findresult</code></p>
  <pre><code>git log --binary \
      --ignore-all-space \
      --ignore-blank-lines \
      --ignore-cr-at-eol \
      --ignore-space-at-eol \
      --ignore-space-change \
      -p -G GitSearch -- \
      vimrc/.vim/plugin/keymap.vim \
      vimrc/.vim/plugin/common.vim
  </code></pre>
  <p>and manually run this command:</p>
  <pre><code>git log --binary \
      --ignore-all-space \
      --ignore-blank-lines \
      --ignore-cr-at-eol \
      --ignore-space-at-eol \
      --ignore-space-change \
      -p -G GitSearch -- \
      vimrc/.vim/plugin/keymap.vim \
      vimrc/.vim/plugin/common.vim
  </code></pre>
  <p>it works, I get search result from git.</p>