nerdexam
Oracle

1Z0-409 · Question #35

As a Linux system administrator you want to check and print the names of the users having UID > 500, and are not using the bash or csh shell. Which two commands would help you to do so? (Choose two.)

The correct answer is A. awk -F: '/([^(bash|csh)])$/ {if ($3 >500) print $1}' /etc/passwd C. awk -F: '/([^(bash)]|[^(csh)])$/ {if ($3 >500) print $1}' /etc/passwd. See the full explanation below for the reasoning.

Question

As a Linux system administrator you want to check and print the names of the users having UID > 500, and are not using the bash or csh shell. Which two commands would help you to do so? (Choose two.)

Options

  • Aawk -F: '/([^(bash|csh)])$/ {if ($3 >500) print $1}' /etc/passwd
  • Bawk -F: '/([(bash)]|[(csh)])$/ {if ($3 >500) print $1}' /etc/passwd
  • Cawk -F: '/([^(bash)]|[^(csh)])$/ {if ($3 >500) print $1}' /etc/passwd
  • Dawk -F: '/([^(nologin)]|[^(ksh)])$/ {if ($3 >500)print$2}' /etc/passwd

How the community answered

(17 responses)
  • A
    76% (13)
  • B
    18% (3)
  • D
    6% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-409 Practice