Linux CLI - Text ProcessingGiven a CSV file with columns: name,age,score, how to print names of people with score above 80 using awk?Aawk -F',' '$2 > 80 {print $3}' file.csvBawk -F',' '$3 > 80 {print $1}' file.csvCawk -F',' '$3 < 80 {print $1}' file.csvDawk -F',' '{print $1}' file.csvCheck Answer
Step-by-Step SolutionSolution:Step 1: Set field separator to commaUse -F',' to split CSV fields correctly.Step 2: Filter rows with score > 80 and print nameScore is third column ($3), name is first ($1), so condition '$3 > 80 {print $1}' works.Final Answer:awk -F',' '$3 > 80 {print $1}' file.csv -> Option BQuick Check:Filter by $3 > 80, print $1 = B [OK]Quick Trick: Use -F',' for CSV and filter with condition in awk [OK]Common Mistakes:Mixing up field numbersNot setting field separatorPrinting wrong column
Master "Text Processing" in Linux CLI9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Linux CLI Quizzes Disk and Storage - du (disk usage by directory) - Quiz 13medium Disk and Storage - du (disk usage by directory) - Quiz 11easy Networking Commands - nslookup and dig for DNS - Quiz 2easy Networking Commands - scp and rsync for file transfer - Quiz 15hard Pipes and Redirection - stdin redirection (<) - Quiz 5medium Pipes and Redirection - stdout redirection (>, >>) - Quiz 15hard Searching and Finding - find command basics - Quiz 11easy Searching and Finding - locate for fast filename search - Quiz 2easy Text Processing - sed (stream editor) basics - Quiz 2easy Text Processing - awk basics (field processing) - Quiz 6medium