QuestionQ103Verified/Users and GroupsCopy linkReport a problemAsk AstroTutorSave questionWhich command generates a list of usernames from /etc/passwd together with their login shell?Acolumn -s : 1,7 /etc/passwdBchop -c 1,7 /etc/passwdCcolrm 1,7 /etc/passwdDcut -d: -f1,7 /etc/passwdShow AnswerAnswerExplanation/etc/passwd uses colons as field separators. Its first field is the user name and its seventh field is the login shell, and cut -d: -f1,7 extracts those two fields.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion