查看指定行
sed -n '45p' file.txt #查看45行的数据
sed -n '45,50p' file.txt #查看45-50行的数据
Use -n to suppress output, and the p command to print specific lines.
-n
By default, sed prints out the pattern space at the end of each cycle through the script . These options disable this automatic printing, and sed only produces output when explicitly told to via the p command.