I am using git grep to search for '\r' characters when i run it in the terminal it lists the output correctly but if i store it in a variable it lists out all the files it has searched for. Any idea on how to correct this.
My command is : git grep -I -c -r -l $'\r' *
I was trying something like this: OUTPUT=$(git grep -I -c -r -l $'\r' *)
I'm displaying output with: echo ${OUTPUT}