Question
Please provide the answers as well as explanation for the following problems. Create another script that has a local variable called searchFor which is set
Please provide the answers as well as explanation for the following problems.
Create another script that has a local variable called searchFor which is set to your username. This script should use grep and the searchFor term to find lines in any file on or under your home directory that contain your username (grep) should use searchFor as a regular expression. What regular expression could you write into the searchFor variable of the previous question to find the three following users in the accounting department? ( Helen-acct, John-acct, Willy-acct) Write a regular expression would zip code + 4 fields of the forms: xxxxx-xxxx where x is any number but the last 4 digits could be missing. The dash at the end of the first 5 numbers will ALWAYS be present AND the field is delineated with spaces or tabs.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started