perl -pi -e '$_ = "" if ($. >= <start> && $. <= <end> );'
perl -pi -e '$_ = "" if ($. >= 2 && $. <= 4 );' file