Correct behavior: echo -e "ln1\nln2\nln3\nln4" > /tmp/sedtest && /bin/sed '1,2d' /tmp/sedtest produces (as expected) ln3 ln4 Error: echo -e "ln1\nln2\nln3\nln4" > /tmp/sedtest && /bin/sed -i '1,2d' /tmp/sedtest && cat /tmp/sedtest truncates the file (makes it empty, so cat does not show any content) I've reported this bug based on this discussion: http://code.google.com/p/wl500g/issues/detail?id=252&colspec=ID%20Type%20Status%20Priority%20Owner%20Summary%20Opened
Fix: http://busybox.net/downloads/fixes-1.19.0/busybox-1.19.0-sed.patch