tr/// returns the number of substitutions made, i.e. 0 (or false) if the searched character wasn't found, and something true otherwise. So it could more or less work to replace a grep in the specific use of grep in the original post, but you can't use a regex to specify that the ">" character should be at the beginning of the line.