The correct answer is C. cut -d : -f 1,4 /etc/passwd
Explanation:
cut is designed for extracting specific fields (columns) from delimited text files.
-d : specifies the colon ":" as the delimiter.
-f 1,4 selects the first (username) and fourth (primary group ID) fields.
Here's why the other options are incorrect:
fmt: Primarily used for formatting text and doesn't have options for field extraction.
split: Divides files into smaller pieces based on size or number of lines, not fields.
paste: Used to merge lines of files, not extract specific columns.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
9866666
5 months, 1 week ago