shell脚本截取列cut的使用
来源:互联网 发布:mysql的事务隔离级别 编辑:程序博客网 时间:2024/05/22 06:56
[root@localhost ~]# cat /etc/passwd | grep "/bin/bash" | grep "root"
root:x:0:0:root:/root:/bin/bash
[root@localhost ~]# cat /etc/passwd | grep "/bin/bash" | grep -v "root" ------------> grep 加了-v 就是取反的结果
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
root:x:0:0:root:/root:/bin/bash
[root@localhost ~]# cat /etc/passwd | grep "/bin/bash" | grep -v "root" ------------> grep 加了-v 就是取反的结果
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
[root@localhost ~]# cat /etc/passwd | grep "/bin/bash" | grep -v "root" | cut -d ":" -f 1
mysql
比如 你要截取多个
这个表示的意思是 我要截取 第二列和第四列
阅读全文
1 0
- shell脚本截取列cut的使用
- shell的字符串截取命令cut
- shell下字符串的截取----cut
- shell脚本awk, sed, cut的妙用
- shell脚本编程---cut的一个用法
- shell 脚本的字符串截取
- Shell脚本的字符串截取
- shell脚本的字符串截取
- shell脚本:字符串的截取
- shell字符串截取(cut)
- shell脚本之cut
- shell中字符串的截取方法、cut基本用法
- Linux shell脚本的字符串截取
- Linux shell脚本的字符串截取
- Linux shell脚本的字符串截取
- Linux shell脚本的字符串截取
- Linux shell脚本的字符串截取
- Linux Shell脚本的字符串截取
- 父节点layout动态添加子节点,container模式动态更新父节点size
- CentOs7改造mysql服务
- [题解]hdu5306 Gorgeous Sequence
- 全方面角度剖析一句话木马
- QT CSV操作
- shell脚本截取列cut的使用
- 传数据不能为中文,而是乱码
- java概述
- 二维数组元素的地址
- Java基础——Request对象的主要方法
- 快速排序(Quick Sort)
- 欢迎使用CSDN-markdown编辑器
- 读程序员的自我修养之编译
- 齐次坐标