Inspect a record using /etc/group format.
Identify the comma-separated supplementary-member list.
docker:x:998:kai,meiWhich value is the member list?
The fourth /etc/group field contains supplementary members separated by commas.
Detailed explanation
xIncorrect. x is the second-field password placeholder.
Incorrect. x is the second-field password placeholder.
kai,meiCorrect. kai,mei is the fourth-field member list.
Correct. kai,mei is the fourth-field member list.
998Incorrect. 998 is the third-field numeric GID.
Incorrect. 998 is the third-field numeric GID.
dockerIncorrect. docker is the first-field group name.
Incorrect. docker is the first-field group name.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'docker:x:998:kai,mei' | cut -d: -f4Expected result
kai,meiKey points
- Field 1 is group name
- Field 3 is GID
- Field 4 is member list
Notes
- Environment: POSIX cut / 模擬レコードのみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.