cut截取数据
参考文档
https://blog.csdn.net/caoshunxin01/article/details/79355566
[root@kube-node3 ~]# cat tab_space.txt
this is tab finish.
this is several space finish
[root@kube-node3 ~]# cat tab_space.txt | grep this | sed -n '1p' | cut -d ' ' -f 1
this
在 /etc/passwd 中输出第 3-5 列:
cat /etc/passwd | cut -d ':' -f 3-5
在 /etc/passwd 中输出第 3到最后一列
cat /etc/passwd | cut -d ':' -f 3-
cut字符串截取 http://blog.51cto.com/2627lounuo/1790446
去掉最后面的 && : 截取最后面&&的所有左端字符
[root@oracledb ~]# cat c.sh
yum -y install binutils && yum -y install compat-libcap1 &&
[root@oracledb ~]# str=`cat orcale_output.sh`
[root@oracledb ~]# echo ${str}
yum -y install binutils && yum -y install compat-libcap1 &&
[root@oracledb ~]# cut=${str%&&*}
[root@oracledb ~]# echo ${cut}
yum -y install binutils && yum -y install compat-libcap1
最新文章
- 关于Scrum团队的理解
- 试用 Nexus OSS 3.0 的docker仓库 (一)
- Excel: Switch (transpose) columns and rows
- POJ 2417 Discrete Logging
- LeeCode(Database)-Employees Earning More Than Their Managers
- Codeforces Round #214 (Div. 2) C. Dima and Salad (背包变形)
- Python 清理HTML标签相似PHP的strip_tags函数功能(二)
- Linux Network Management
- Oracle-2 - :超级适合初学者的入门级笔记--定义更改约束,视图,序列,索引,同义词
- 【转】构建高性能WEB站点之 吞吐率、吞吐量、TPS、性能测试
- Java包装类介绍与类型之间相互转换
- maven项目打包成war包发布到tomcat下...
- Vector集合
- WCF REST模式下的UriTemplate路径问题
- 【Gtk】feorda下gtk安装详解
- Linux SWAP 交换分区配置说明(转)
- Python3 字典 get() 方法
- Django学习笔记-2018.11.17
- 2017 ACM区域赛(南宁站) 参赛流水账
- Unity3D开发之Matrix4x4矩阵变换
热门文章
- 23 export default和export的使用方式
- python pip获取所有已安装的第三包
- LeetCode 308. Range Sum Query 2D - Mutable
- Vue.js最佳实践(五招助你成为vuejs大师)
- 中检测到有潜在危险的 Request.Form 值。”
- 42 | grant之后要跟着flush privileges吗?
- [Luogu] 运输计划
- 下载MAMP
- linux 查询cpu版本、核心、线程脚本
- 使用Redis sorted set实现集合设置member过期