具體路線
$ cat ip.txt
address
range
substitution
pattern
sample
-
** 第 N 行
$ sed -n '2p' ip.txt range $ sed '3d' ip.txt address range pattern sample
-
最後一行
$ sed -n '$p' ip.txt sample
$ cat ip.txt
address
range
substitution
pattern
sample
** 第 N 行
$ sed -n '2p' ip.txt
range
$ sed '3d' ip.txt
address
range
pattern
sample
最後一行
$ sed -n '$p' ip.txt
sample