Perl のワンライナーで複数行置換したい
BEGIN{undef $/;}
を入れると良い。
perl -i -pe 'BEGIN{undef $/;} s/START.*STOP/replace_string/smg' file_to_change
参考: https://stackoverflow.com/questions/1030787/multiline-search-replace-with-perl
BEGIN{undef $/;}
を入れると良い。
perl -i -pe 'BEGIN{undef $/;} s/START.*STOP/replace_string/smg' file_to_change
参考: https://stackoverflow.com/questions/1030787/multiline-search-replace-with-perl