I was wondering if there's a way to search within a file that's been compressed. i.e. if file a is inside file a.zip or a.gz, is there a a command that will retrieve the string of data I'm looking for in file a, and list which compressed file it found it in?
That's what grep does best. Given some files to grep, it searches for the pattern in those files. So you need not worry about that. It will throw up all searches which are successful. i.e. files which contain the pattern.