If /bin/sh is a symlink to dash, "lzgrep something *.lzma" always immediately returns with an error. I did not check all the whole script, but it is full of bashisms like ${VAR//...}. When #!/bin/sh is replaced by #!/bin/bash there are no problems.
Created attachment 156833 [details, diff] lzpipe-sh.patch This fixes it for sh -> dash.
do not check BASH_VERSION ... run it in a subshell first before trying to use it in the active shell
(In reply to comment #2) > do not check BASH_VERSION ... run it in a subshell first before trying to use > it in the active shell I think is useless to check for bash here, a not supporting shell should ignore it without any problem
xz-utils is POSIX code