Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file?
1) awk -F: '{print $1, $4}' /etc/passwd
2) grep -oE '^[^:]+:[^:]+:[^:]+:[^:]+:[^:]+:[^:]+:[^:]+:[^:]+

/etc/passwd
3) sed -n 's/^([^:]*):[^:]*:[^:]*:([^:]*):.*/1 2/p' /etc/passwd
4) cut -d: -f1,4 /etc/passwd

Respuesta :