nerdexam
LPI

102-350 · Question #137

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

(28 responses)
  • A
    75% (21)
  • B
    14% (4)
  • D
    4% (1)
  • E
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 102-350 Practice