zoukankan      html  css  js  c++  java
  • 使用cut 提取ip

    cut用法格式:

    cut  [参数] 文件名

    -b :以字节为单位进行分割。
    -c :以字符为单位进行分割。
    -d :自定义分隔符,默认为Tab。
    -f :一般与 -d 一起使用,指定显示哪个区域。

    提取IP实例:

    [root@t156 ~]# hostname -I
    192.168.1.156 192.168.1.170 
    [root@t156 ~]# hostname -I|cut -d " " -f2
    192.168.1.170
  • 相关阅读:
    bzoj1027
    bzoj1069
    poj2079
    poj2187
    bzoj2281
    bzoj2285
    bzoj1558
    bzoj1822
    bzoj1559
    bzoj1570
  • 原文地址:https://www.cnblogs.com/xzlive/p/15214317.html
Copyright © 2011-2022 走看看