shell获取ip的值
来源:互联网 发布:微博营销软件下载 编辑:程序博客网 时间:2024/06/05 14:13
[root@iZ2zee01smz5y5cfifeox0Z shell]# cat ip.txt
192.168.1.20
[root@iZ2zee01smz5y5cfifeox0Z shell]# cat ip.txt | cut -d \. -f 3
1
[root@iZ2zee01smz5y5cfifeox0Z shell]# cat ip.txt | cut -d \. -f 2
192.168.1.20
[root@iZ2zee01smz5y5cfifeox0Z shell]# cat ip.txt | cut -d \. -f 3
1
[root@iZ2zee01smz5y5cfifeox0Z shell]# cat ip.txt | cut -d \. -f 2
168
这里主要是用了cut工具的-d和-f参数:
-d:指定字段的分隔符,默认的字段分隔符为“TAB”;
-f:显示指定字段的内容;
阅读全文
0 0
- shell获取ip的值
- shell获取IP地址
- shell 获取主机ip
- 使用shell获取ip地址
- shell中获取ip地址
- shell 获取本地IP地址
- shell获取本机ip
- Linux下获取IP、MAC、网关、掩码的shell脚本
- Linux下获取IP、MAC、掩码的shell脚本
- 使用python获取动态分配的ip地址并传给shell
- Shell 命令行获取本机IP,grep的练习
- unix shell获取IP和修改IP
- python shell 根据ip 获取 hostname || 根据hostname 获取 ip
- shell中获取本机ip地址
- shell命令使用sed获取ip命令
- shell脚本获取当前ip地址
- shell中获取本机ip地址
- linux shell获取本机ip地址
- jvm Stop-The-World
- Shell脚本实现简单分割字符串
- 顺序表和单链表的优缺点
- 移动端车牌识别流程与重要性
- mmap使用说明
- shell获取ip的值
- iOS【使用MJRefresh上拉加载 回调将会多次调用的问题】
- 判断两个字符串是否为包含关系
- failed to chmod no such file or directory
- python中的匿名函数
- eclipse
- 每天一个linux命令(2):cd命令
- JSON解析
- 数据库基础:关系模型