cut 命令

请参考 Shell中获取当前IP地址

cat example 
test2 
this is test1 
cut -c0-6 example ## -c m-n 表示一行的第m个字元到第n个字元
test2 
this i 

-----file----------- 

   liubi 23 14000 
---------file----------- 
  # cut -c 3-9,12-20 file 
  liubi 14000 

 

 

 

 

原文地址:https://www.cnblogs.com/wangkangluo1/p/2455025.html