nerdexam
LPI

117-102 · Question #37

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

The correct answer is A. cat /etc/passwd | grep Bob | cut -d: -f3 C. grep Bob /etc/passwd | awk -F: '{ print $3 }'. See the full explanation below for the reasoning.

Question

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

Options

  • Acat /etc/passwd | grep Bob | cut -d: -f3
  • Bcat /etc/passwd | grep Bob | cut -f: -d3
  • Cgrep Bob /etc/passwd | awk -F: '{ print $3 }'
  • Dgrep Bob /etc/passwd | awk -f: '{ print $3 }'
  • Egrep Bob /etc/passwd | cut -F: -d3

How the community answered

(49 responses)
  • A
    76% (37)
  • B
    4% (2)
  • D
    6% (3)
  • E
    14% (7)

Community Discussion

No community discussion yet for this question.

Full 117-102 Practice