揮発性のメモ2

http://d.hatena.ne.jp/iww/

2015-09-17から1日間の記事一覧

STARTとENDに挟まれた行を別のファイルと置換する

a.txt the world stop time START this is my world END and time resumesa.txt のうち、START と END に挟まれた部分を別ファイルb.txtと置換する ただしSTARTとENDの行は残す sedの場合 sed -n '1,/START/p' a.txt; cat b.txt; sed -n '/END/,$p' a.txt pe…