Question: Linux please. bash shell. 1 . Your script will then solve each of these Command Substitution exercises. You need to use the variable in all

Linux please. bash shell.
1.Your script will then solve each of these Command Substitution exercises. You need to use the variable in all paths.
a.Use grep to search the contents of all files in your ~/Documents/cis190 directory for the string bash make sure that the grep output is only the filename and not the line that was matched. Use command substitution to use this output as a list of files for ls -lh giving you a way to get the long listing human readable results for a list of files that was generated by grep and substituted in here! This is a cool use of command substitution :)
b.Create a variable called cs1 and store the results from running exercise 2a above.
c.Echo the contents of the cs1 variable.
d.Create a variable called cs2 and store in it the contents of the $PATH variable use command substitution to accomplish this.
e.Echo the contents of the cs2 variable.
f.Use the cs2 variable and add the contents of the dirname variable to the beginning of the cs2 variable and separate it from the other contents with a : but dont lose the current contents. This is not as hard as you are probably thinking!
g.Echo the contents of the cs2 variable.

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!