Skip to content

Instantly share code, notes, and snippets.

@bluerabbit
Created February 14, 2013 09:27
Show Gist options
  • Select an option

  • Save bluerabbit/4951546 to your computer and use it in GitHub Desktop.

Select an option

Save bluerabbit/4951546 to your computer and use it in GitHub Desktop.
sedを利用して範囲データを取得する
sed -n '開始行,終了行p' ファイル名
%cat hoge.txt
1
2
3
4
5
%sed -n '3,4p' hoge.txt
3
4
%sed -n '3,4p' hoge.txt > 3-4_hoge.txt
%cat 3-4_hoge.txt
3
4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment