Question: 1. Using grep and the terms file a. Find all words that contain the string berry (b in upper or lower case) b. The string

1. Using grep and the terms file

a. Find all words that contain the string berry (b in upper or lower case)

b. The string berry must occur at the beginning of the line

c. There should be line numbers before each line

d. Redirect the output to ~/2berry.txt

e. Using grep and the terms file

f. Find all words that contain the string shark

g. The word shark must be self-contained (not part of another word) (ie.

shark is correct, cardshark is not correct)

h. There should be line numbers before each line

i. Redirect the output to ~/3shark.txt

2. Using grep and multiple files

a. Use recursive grep to search all files in /scripts/work/ , suppress any

warnings.

b. Find all words that end with stone or end with rate

c. Search only directories beginning with A or a

d. There should be line numbers before each line

e. Redirect the output to ~/4stonerate.txt

3. Using find

a. Find only files (not directories) in the /scripts/work directory

b. Beginning with capital A

c. Followed by any 1 character

d. Followed by lowercase d

e. Followed by any number of characters

f. Ending with e .

g. Redirect the output to ~/5find.txt

4. Using find with cp

a. Find only files (not directories) in the /scripts/work directory

b. Beginning with lowercase z

c. Sixth letter is lowercase m

d. Followed by any number of characters

e. Ending with lowercase s

f. Use the -exec option to copy the file to /home/user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!