QuestionQ17Verified/GNU and Unix CommandsCopy linkReport a problemAsk AstroTutorSave questionWhich command creates a list of user names from /etc/passwd together with their login shell?Acolumn -s : 1,7 /etc/passwdBchop -c 1,7 /etc/passwdCcolrm 1,7 /etc/passwdDsort -t: -k1,7 /etc/passwdEcut -d: -f1,7 /etc/passwdShow AnswerAnswerExplanation/etc/passwd is colon-delimited, with the user name in field 1 and the login shell in field 7. cut -d: -f1,7 /etc/passwd selects exactly those two fields.Show comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion