LoginSignup
0
1

More than 5 years have passed since last update.

sedコマンドを使用してファイル内で指定した文字列間の行を抜き出す

Last updated at Posted at 2017-07-11

コマンド

sample.sh
$ cat filename | sed -ne '/FROM/,/TO/p'

オプション説明

-e : 置換処理、行の削除・選択などを行うオプション
-n + フラグのp(''内の末尾に記述) : 出力を行うオプション

動作環境

centos7.2

その他

sedコマンドの使用例はこちらの記事に詳しく書かれています

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1