Exercises - Finding Things

These exercises and associated resources are attributed to Dr Jim Tyson.

Exercise 1: Selecting lines

Use grep, >, and wc.

Exercise 2: More searching with regular expressions

Use grep.

Find all the pupils whose names begin with DE and whose line of data ends with 5.

Exercise 3: Search and display columns

Use grep and cut.

Find all the pupils with surnames beginning with M and display just their maths results.

The order of the columns is:

Surname, Sex, Class, Math_score, English_score, History_score

Next activity: Assessments - Finding Things Quiz.