cut用法格式:

cut  [参数] 文件名

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

实例:

[root@localhost ~]# hostname -I
192.168.43.12 
[root@localhost ~]# hostname -I|cut -d "." -f1,2,3
192.168.43
[root@localhost ~]# 

 

相关文章:

  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2021-07-24
  • 2021-08-09
  • 2022-12-23
猜你喜欢
  • 2023-03-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-07-29
  • 2021-08-24
相关资源
相似解决方案