Objective
To work with the pipe symbol, the grep command, and redirection
Instructions
Perform each of the tasks described below and record the command(s) used to complete each task in a text file.
- Copy the file named `phone_book` from my documents directory. (`/home/singer/docs`)
- Use grep and/or cut commands to extract the following information from the phone_book file.
- A list of all the data for people who have a 4 in their phone number or zip code.
- A list of all of the first and last names only.
- A list of all of the phone numbers only.
- A list of all of the data for people whose zip code is 86776.
- Create a file containing all of the data for people whose zip code starts with 20. Name the file zip20.
- 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.)
- Display all of the data for people with last names beginning with M.
- Display all of the data for people whose first and last names begin with M.
- A list of only the first names