linux cut字符串切割

linux字符串列截取  cut  -d ‘分割条件’ -f ‘列数’

[root@LocalWeb01 ~]# less  /etc/passwd | grep '^user' | grep -v 'root' | cut -d ':' -f 1
user1

原文地址:https://www.cnblogs.com/agang-php/p/4086317.html