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.
Your script will then solve each of these Command Substitution exercises. You need to use the variable in all paths.
aUse grep to search the contents of all files in your ~Documentscis 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 :)
bCreate a variable called cs and store the results from running exercise a above.
cEcho the contents of the cs variable.
dCreate a variable called cs and store in it the contents of the $PATH variable use command substitution to accomplish this.
eEcho the contents of the cs variable.
fUse the cs variable and add the contents of the dirname variable to the beginning of the cs 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!
gEcho the contents of the cs variable.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
