Skip to content

Repository files navigation

Lab 03 Text Processing and Manipulation

Part 1 grep - Finding Patterns

Tasks

  • Find all lines containing the word "ERROR" in system.log
  • Find all lines containing the word "warning" (case-insensitive) in system.log
  • Find all lines containing "INFO" and show line numbers
  • Count how many ERROR, WARNING, and INFO entries are in system.log
  • Find all lines that start with "2025-04-01 1" in system.log
  • Find all lines containing an IP address in system.log
  • Find all email addresses in contacts.txt

Part 2 sed - Stream Editing

Tasks

  • Replace all occurrences of "ERROR" with "CRITICAL" in a copy of system.log
  • Remove all blank lines from sample.txt
  • Print only lines 5-10 from sample.txt
  • Replace "Manager" with "Team Lead" and "Developer" with "Software Engineer" in contacts.txt
  • Add "PROCESSED " to the beginning of each line in a copy of contacts.txt

Part 3 awk - Text Processing

Tasks

  • Print only the names and email addresses from contacts.txt
  • Print sales records where the quantity is greater than 10 from sales.txt
  • Print product name and total sales amount from sales.txt
  • Calculate and print the total sales amount for all products
  • Create a nicely formatted list of contacts with titles

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages