Question: 8 Create a simple shell script which will use environment variables to: Read the TRGT _ EXT environment variablelto determine what file extension we are
Create a simple shell script which will use environment variables to:
Read the TRGTEXT environment variablelto determine what file extension we are looking for for example, png txt pdf etc.
When testing, set this environment variable up manually by physically typing commands into the command line before calling the script.
Set a new shell variable to the list of files in the current directory that have those extensions: use Is for this.
In one single final echo statement, and then provide the following information:
The directory you are searching in current working directory
a list of the files you found in step Don't rerun the Is command, you should use the result saved in your environment variable from step
It's okay if the output looks wacky if there are no matching files.
Please help if you can, thanks
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
