#author(“2018-01-15T03:39:37+00:00”,“default:kazuma”,“kazuma”) Linux全般
特定の行以降(最初の行を飛ばして)表示させたい場合 [#f032d6a1]
$ tail -n +2 hoge.txt
最後から数行飛ばす [#s4132599]
$ head -n -5 hoge.txt
最初の数行と最後の数行を飛ばして表示 [#o6b54a83]
$ cat hoge.txt | tail -n +2 | head -n -2
特定の行から特定の行までを表示させたい場合 [#s01cbf74]
$ cat test.txt | sed -n '4,8p'
最初と最後の行を表示させる [#r73fdbfb]
$ cat test.txt | sed -n -e '1p' -e '$p'