Perform this lab in linbox (class server)see Resources &Links for login info. You may need to review
Fantastic news! We've Found the answer you've been seeking!
Question:
Perform this lab in linbox (class server)—see Resources &Links for login info.
You may need to review Scripting Assignments #1, #2, and / orScripting chapter / assignments.
Part I
- In your home directory, make a new directory calleddir1.
- Go into dir1 and use the touch command tocreate the following files:
apple, banana, carrot, date, egg,fish, grape, ham.
- List the contents to verify that you have all 8 files
- Open your favorite text editor, and create a shell scriptcalled Wildcards.sh
- Include this remark: “This script will include wildcards.”
- Have your script clear the screen.
- Have your script change into the dir1 directory.
- Have the script state, “The contents of dir1are: ”
- Have your script use a wildcard to display the files on thesame line.
- Save and exit. Verify that the script is present.
- Make the script executable, then run it.
- If your script does not execute successfully, troubleshootuntil it does.
- Include a screen scrape of the results of your scriptexecution.
The contents of dir1 are: apple bananacarrot date egg fish grape ham
glenn_jones@linbox:~$
Part II
- Make a copy of your script named Wildcards_part2.sh in the samedirectory.
- In your home directory, make a new directory calleddir2.
- Edit your new script to append the following to the end of thescript:
- Have it go back into the home directory: cd..
- Have it use a wild card to copy all of the files in dir1 todir2.
- Have it change into the dir2 directory.
- Have the script state, “The contents of dir2are: ”
- Have your script list the files on the same line.
- Save and exit. Run the script, and include a screenscrape of the results.
The contents of dir1 are: apple bananacarrot date egg fish grape ham
The contents of dir2 are: apple bananacarrot date egg fish grape ham
glenn_jones@linbox:~$
Related Book For
Statistics The Art And Science Of Learning From Data
ISBN: 9780321755940
3rd Edition
Authors: Alan Agresti, Christine A. Franklin
Posted Date: