First contact with shell scripting.
Look through the manual pages of the commands you use and try to
understand some of the options.
Try to use as many shortcuts you discovered in Homework 1-3 as
(copy&paste, Up Arrow, TAB, etc). Typing is a waste of time.
1. Open several terminal windows and a web browser displaying this
2. Run "top" in one of the terminal windows and keep an eye on what
happens to the memory and cpu load as you perform the next
3. Make a directory named test-a, go into that directory, create 9
files named a1.txt - a9.txt each containing a random number (hint:
$RANDOM associated with echo).
4. Create a file named aa.txt containing all the numbers in the
previous files, one on a line (hint: use cat associated with
wildcards). Do that using only one command.
5. Go outside test-a and remove that directory.
6. Write a shell script named maketest.sh that will do the same as
exercises 3 and 4 (hint: copy the commands in a file, add the magic
number, make it executable, execute it). Did you have any problems
while trying to execute it?
7. Modify your script to use "a" as an argument to the script, e.g.
8. Add comments to your shell script.
9. Try to make the script as scalable as possible (e.g. to be able
create "any" number of files just by changing one parameter inside
an argument). Comment on the range of "any" and how complicate
to implement that. Don't run a script that will create more than
files, go gradually to that number and see what problems you
Don't forget to delete the directory after each run.
10. Try a "parallel" version of the script where you spawn several
processes that will write files. Keep the total number of files