Which of the following commands shows ONLY the user id …

Which of the following commands shows ONLY the user id of Bob? (Select TWO)

Which of the following commands shows ONLY the user id of Bob? (Select TWO)

A.
cat /etc/passwd | grep Bob | cut -d: -f3

B.
cat /etc/passwd | grep Bob | cut -f: -d3

C.
grep Bob /etc/passwd | awk -F: ‘\\’7b print $3 }’

D.
grep Bob /etc/passwd | awk -f: ‘\\’7b print $3 }’

E.
grep Bob /etc/passwd | cut -F: -d3

Explanation:
Ref: man cut + man (g)awk



Leave a Reply 0

Your email address will not be published. Required fields are marked *