I just want to match some text in a Bash script. I\'ve tried using sed but I can\'t seem to make it just output the match instead of replacing it with something.
Use grep. Sed is an editor. If you only want to match a regexp, grep is more than sufficient.