Use the spaces provided to show your complete work (the command you used to accomplish each task and the output from you
Posted: Tue Jul 05, 2022 10:19 am
Use the spaces provided to show your complete work (the commandyou used to accomplish each task and the output from your command).Remember, regular expressions are case sensitive unless otherwisespecified.
Now that you have some experience with simple regularexpressions, let’s try them on more complex files. Questions 13–19refer to the /home/unix/assets/clients file. Copy it into yourcurrent directory if you wish.
1. Display lines that are for the street addresses (e.g., 123Main St.).
2. Display lines that contain a five-digit ZIP code.
3. Display lines that contain a nine-digit ZIP code.
4. Display lines that contain either a five- or nine-digitZIP code.
5. How many entries are in the file? Write a command that willfigure it out, giving only a single
6. Display lines that contain an email address. For ourpurposes, the username portion consists of letters, numbers,underscores, and dots and the domain portion consists of letters,numbers, and dots. Assume any email with @ is valid email account].number as its output. Visually verify that the answer iscorrect.
7. Create a file called clients.new that contains only thenames and phone numbers, each on a separate line.
Now that you have some experience with simple regularexpressions, let’s try them on more complex files. Questions 13–19refer to the /home/unix/assets/clients file. Copy it into yourcurrent directory if you wish.
1. Display lines that are for the street addresses (e.g., 123Main St.).
2. Display lines that contain a five-digit ZIP code.
3. Display lines that contain a nine-digit ZIP code.
4. Display lines that contain either a five- or nine-digitZIP code.
5. How many entries are in the file? Write a command that willfigure it out, giving only a single
6. Display lines that contain an email address. For ourpurposes, the username portion consists of letters, numbers,underscores, and dots and the domain portion consists of letters,numbers, and dots. Assume any email with @ is valid email account].number as its output. Visually verify that the answer iscorrect.
7. Create a file called clients.new that contains only thenames and phone numbers, each on a separate line.