linux 如何显示一个文件的某几行(中间几行)
来源:互联网 发布:sql for update 用法 编辑:程序博客网 时间:2024/06/10 03:49
【一】从第3000行开始,显示1000行。即显示3000~3999行
cat filename | tail -n +3000 | head -n 1000
【二】显示1000行到3000行
cat filename| head -n 3000 | tail -n +1000
*注意两种方法的顺序
分解:
tail -n 1000:显示最后1000行
tail -n +1000:从1000行开始显示,显示1000行以后的
head -n 1000:显示前面1000行
【三】用sed命令
sed -n '5,10p' filename 这样你就可以只查看文件的第5行到第10行。
0 0
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- 英雄会-----倒水-----欧几里德算法
- Android 分享设置 ShareSDK QQ空间 腾讯微博 新浪微博
- 入门体验第二天
- javascript连续滚动代码(测试可用)
- Roman to Integer
- linux 如何显示一个文件的某几行(中间几行)
- struts2的s:iterator 标签 详解
- MyEclipse安装插件的几种方法
- 临界时间点问题
- 重新设置ACCESS中表的自动递增字段的起始编号
- pomelo 学习 (2)- 基本结构
- js面向对象方法介绍
- 《基于ORACLE SQL优化》读书笔记-表的连接类型
- HTML5 & Flash 现状及未来预测