PDF Version Available

This document is also available in PDF format: greplab.pdf

The PDF version includes bookmarks for easy navigation and is optimized for printing.

Accessibility Notice

This document is also available in HTML format at:

https://aholdengouveia.name/LinuxAdmin/labexcercises/greplab.html

The HTML version provides enhanced accessibility features including keyboard navigation, screen reader support, responsive design, dark mode support, and high contrast options.

Objectives:

Complete the following problems

References, a video and some notes are available at my website

https://www.aholdengouveia.name/LinuxAdmin/Grep.html

Please include the command, a screenshot showing it works as intended, cite all sources you used, and give a short explanation of how the command works and why.

  1. Print all lines containing the string Lane
  2. Print all lines where the person's first name starts with H
  3. Print all lines ending in three zeros (000)
  4. Print all lines that don't contain 408
  5. Print all lines where birthdays are in the year 1935 (be careful of the date format! it's MM/DD/YY)
  6. Print all lines where the phone number is in an area code that starts with an 8
  7. Print all lines containing an uppercase letter, followed by 4 lowercase letters, a space and one uppercase letter.
  8. Print lines where the address begins with a two or three digit number (so this would be 12 main st or 123 main street but not 1234 main street).
  9. Print lines where the person lives in Mass or Illinois
  10. Print lines containing the addresses that aren't on a street (You might see St as shorthand for street)

Deliverables

A text document with the grep statements used to get each result. Clearly labeled so I can see which answer goes to which question.

Please include the command, a screenshot that includes the command and a few results showing it works as intended, cite all sources you used, and give a short explanation of how the command works and why. Make sure everything is in your own words. Think of the explanation as you trying to walk someone through how to use grep when they haven't heard of it before.