I use ubuntu 14.4
, and attempt 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've searched for this issue and just found out that it was a bug in ubuntu 12.4
and there is not any describe about, can anybody help me to figure out this problem?
I run the following command:
grep -E -r -o -n r"%}(.*){%" > myfile
grep pattern file > file
then it doesn't work. You cannot use the same file as input and output for grep. – jimmij Oct 25 '14 at 21:29bash: ../f.txt: Permission denied
– Kasra Oct 25 '14 at 21:37