02-20-2010
1,
0
Join Date: Feb 2010
Last Activity: 24 February 2010, 4:10 PM EST
Posts: 1
Thanks Given: 0
Thanked 0 Times in 0 Posts
Rookie grandmother needs help with script!!
I'm just starting learning Unix by myself and I need help writing a script. Any help is greatly appreciated!!! Thank you!!
Here it is:
Note: The output files labout1 and labout2 must be passed
to the script as command line arguments. There should be no
reference to the filenames labout1 or labout2 in your script.
* Steps 1-5 listed below must be part of the lab.scr script.
* All files must be contained within your lab directory.
1. Create a directory with the name lab in your home directory
demonstrating use of the Keyword Shell Variable that contains the
value of your home directory.
2. Declare the local variable lab_dir to the value
of your lab directory.
3. Output file labout1 should contain the output
from the following Unix commands:
* List all filenames in the /home/user/lab
directory beginning with "host" that were created
in September.
* Display the search path for executables.
4. Output file labout2 should contain the output
from the following Unix commands:
* Display the value of your lab_dir variable.
* Copy the lab.readme file from /home/user to your
lab directory using the lab_dir variable. List
the file access permissions for the file copied.
* List variables set in your environment displaying
ONLY the variable lab_dir and its value.
5. Create a file in your lab directory with the filename lab.out
that contains the contents of the labout1 and labout2 files.