GNU sed 3.02.80, the one most users are expected to have still, does not support the -s option. Is this one really necessary ? Also, could you hack up a man page for your script.
No it, isn't. But I assumed that everybody would be using sed-4.0 as it is in portage for quite some time now. If you want to avoid the dependency, just replace xargs sed -s by xargs -l sed The later does the exact same thing, but it will spawn a sed process for each file, while the former processes all files [at least as many as it fits on a single command line] within the same process. Unfortunately there isn't any other way [AFAIK] to get the 4th line of each file. Regarding the man script, I'll give it a shot and attach it here.
Created attachment 5899 [details] distfiles-clean.1 Simple manpage based on the formating of the qpkg one.