linux字符串列截取 cut -d ‘分割条件’ -f ‘列数’
[[email protected] ~]# less /etc/passwd | grep ‘^user‘ | grep -v ‘root‘ | cut -d ‘:‘ -f 1
user1
时间: 2024-10-13 06:39:32
linux字符串列截取 cut -d ‘分割条件’ -f ‘列数’
[[email protected] ~]# less /etc/passwd | grep ‘^user‘ | grep -v ‘root‘ | cut -d ‘:‘ -f 1
user1