NCAE Mapping Hub
Overview Scoreboard Data Roles Exercised Checklists Lessons Skill Drills Practice Terminal Progress
performance medium Apply field-extract 2 points

Question 37. CSCD240-E1-A

data.csv has comma-separated records. Print just the second column.

Work the drill

Answer on paper or in a terminal before revealing the ideal answer.

Ideal answer
cut -d ',' -f 2 data.csv
Acceptable alternatives: ["awk -F, '{print $2}' data.csv", "awk -F',' '{print $2}' data.csv"]

Misconception bank

Each row below is a plausible wrong answer, the thinking that produces it, and the remedy that corrects the misconception. These are the foundation of the multiple-choice framing and the targeted feedback a student receives after answering.

cut -f 2 data.csv
Misconception. Default delimiter is tab, not comma — no matches.
Remedy. Explicit -d for non-tab delimiters.
cut -d , -f 2 data.csv
Misconception. Works in most shells; comma not quoted. Accept.
Remedy. Quoting the delimiter is safer but optional for comma.

Authority mappings

Hover any chip for the mapping justification; click to open the authority record.

DCWF tasks: T0259
KU outcomes: CD-OSC-O2
KU topics: CD-OSC-T5

Course-artifact links

Lectures

  • CSCD240-S26-L08. Pipes, filters, grep, sort, uniq, wc, tar

Lab questions

  • CSCD240-S26-LAB5: Use wc -l, head -n 5, tail -n 5, cut -d, -f 2 on a CSV.