grep loses coloring when run from bash script
When you run a script, a new shell is spawned to do so. This new environment doesn't have the same settings as your default shell. As to how to get the coloring back, I'm not sure. You might try sourcing your profile at the start of the script:
#!/bin/bashsource $HOME/.bash_profile
or whichever file makes sense on your particular unix flavor (.profile, .bash_rc, .bashrc .bash_profile) to name a few.