I\'ve got a script that calls grep to process a text file. Currently I am doing something like this.
$ grep \'SomeRegEx\' myfile.txt > myfile.txt.temp $ m
Store in a variable and then assign it to the original file:
A=$(cat aux.log | grep 'Something') && echo "${A}" > aux.log