1. grep pattern /tmp/file 2. cat /tmp/file | grep pattern