【每天一个linux命令】sed sed:管道命令。增删改查 某行 # 显示文件第2行 sed -n '2p' yy.log # 显示文件前3行 sed -n '1,3p' yy.log # 读取前3行 cat ./awk.log |sed -n '1,3p'