I run the following command to search for text in files and display a pretty output:
$ grep -rnI "SEARCHTERM" . | sed 's/\:\s\+/\:\n/g'
./path/filename.php:LINENUMBER:
This line contains SEARCHTERM
But when I try to run it as an alias I get an error:
$ alias lookfor="grep -rnI '\\!^' . | sed 's/\:\s\+/\:\n/g'"
$ lookfor SEARCHTERM
sed: can't read SEARCHTERM: No such file or directory
Any thoughts as to why my alias is failing? I'm sure it's some sort of quoting issue...