The below expression
var=$(git log --since='$start_date' --until='$end_date' --author='$commit_author' | grep -i 'merge request\|pull request' | wc -l)
echo $var
prints var as zero
but if I echo the above expression
git log --since='2018-04-1' --until='2018-06-30' --author='so.sila@xes.com' | grep -i 'merge request\|pull request' | wc -l
and copy it and execute via terminal works
why is that var not storing the value and returns zero