nerdexam
Oracle

1Z0-409 · Question #13

The user smith executes the following command: awk -F: '/bash$/ {nlines++; print $1;} END {print "\n", nlines}' /etc/passwd. What could be the purpose of using this command?

The correct answer is C. to print and count the names of the users who use the bash shell. See the full explanation below for the reasoning.

Question

The user smith executes the following command:

awk -F: '/bash$/ {nlines++; print $1;} END {print "\n", nlines}' /etc/passwd. What could be the purpose of using this command?

Options

  • Ato print all lines in /etc/passwd that ends with bash
  • Bto print the name of all normal users in /etc/passwd
  • Cto print and count the names of the users who use the bash shell
  • Dto print the total number of lines in /etc/passwd that ends with bash

How the community answered

(37 responses)
  • A
    16% (6)
  • B
    5% (2)
  • C
    73% (27)
  • D
    5% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-409 Practice