bzip2 mishandles files that have names with embedded newlines: $ echo x | bzip2 > "$(printf "foo\nbar1.bz2")" $ echo x | bzip2 > "$(printf "foo\nbar2.bz2")" $ bzgrep x * sed: -e expression #1, char 7: unterminated `s' command sed: -e expression #1, char 7: unterminated `s' command