I use ubuntu 14.4, and been attempting to redirect the output of grep command to a file, but I keep getting this error:
grep: input file 'X' is also the output
I run the following command:
grep -E -r -o -n r"%}(.*){%" > myfile
As the error states, it seems that somehow it's interpreting the input and output as same name/obj. I searched but couldn't find what exactly is the problem?!