Threesuns

Email the Instructor

Contact

All Semesters

Semesters

All Courses

Courses

2016Spring

01.11.16 - 05.08.16

Introduction to UNIX/Linux

CSCI1483

Tuesday Thursday
10:00 AM - 11:20 AM

Piping, Grep, and Redirection

Lab04

Objective: To work with the pipe symbol, the grep command, and redirection

pastdue

Submit Your Solution

Lab04

Request a Copy of your Solution

Lab04

Requirements

Record each of the command used (2 pts each)20 pts
Total20 pts

Instructions

Perform each of the tasks described below and record the command(s) used to complete each task in a text file.

  1. Copy the file named `phone_book` from my documents directory. (`/home/singer/docs`)
  2. Use grep and/or cut commands to extract the following information from the phone_book file.
    1. A list of all the data for people who have a 4 in their phone number or zip code.
    2. A list of all of the first and last names only.
    3. A list of all of the phone numbers only.
    4. A list of all of the data for people whose zip code is 86776.
    5. Create a file containing all of the data for people whose zip code starts with 20. Name the file zip20.
    6. Create a file listing for people with a 546 phone prefix. Store only their names in the file alphabetically by last name. (Use piping and redirection.)
    7. Display all of the data for people with last names beginning with M.
    8. Display all of the data for people whose first and last names begin with M.
    9. A list of only the first names