Description of problem: sed can die needlessly with too many open files Version-Release number of selected component (if applicable): Red Hat 9, package sed-4.0.5-1 How to reproduce: Try a sed command line that would read more than about 1024 files. Here we create a directory with 1040 files and try to sed them all at once. Note that the sed command attempts to do exactly the same thing as the grep command preceding it, but only opens, in this case, the first 1021 files. Script started on Fri Aug 22 20:35:49 2003 sh-2.05b$ ls sh-2.05b$ for a in a b c d e f g h i j k l m >> do >> for b in a b c d e f g h i j >> do >> for c in a b c d e f g h >> do >> date >$a$b$c >> done >> done >> done sh-2.05b$ cat * | wc -l 1040 sh-2.05b$ ls | wc -l 1040 sh-2.05b$ grep : * | wc -l 1040 sh-2.05b$ sed -n /:/p * | wc -l sed: can't read mhf: Too many open files sed: can't read mhg: Too many open files sed: can't read mhh: Too many open files sed: can't read mia: Too many open files sed: can't read mib: Too many open files sed: can't read mic: Too many open files sed: can't read mid: Too many open files sed: can't read mie: Too many open files sed: can't read mif: Too many open files sed: can't read mig: Too many open files sed: can't read mih: Too many open files sed: can't read mja: Too many open files sed: can't read mjb: Too many open files sed: can't read mjc: Too many open files sed: can't read mjd: Too many open files sed: can't read mje: Too many open files sed: can't read mjf: Too many open files sed: can't read mjg: Too many open files sed: can't read mjh: Too many open files 1021 sh-2.05b$ exit Script done on Fri Aug 22 20:37:28 2003
Seems to be fixed in sed-4.0.7-{2,3}.