IT244: Introduction to Linux/UNIX – Fall 2010 Homework 5

advertisement
IT244: Introduction to Linux/UNIX – Fall 2010
Homework 5
Due: Monday, 11/17/2010
Chapters 8, 12, 13:
NOTE: For all scripts that you are asked to write, please make sure that
you write an actual script on Linux (sf05.cs.umb.edu) and test it.
Page 346
1) (10 points) Q. 5.
 For part b, the question is asking why, for the needs of the
script, cat would be used for the second input.
NOTE: cat with no arguments takes input from the
command line. To end the input, enter Ctrl-D. Type
this script in and run it for yourself.
2) (10 points) Q. 6.
 Make sure that you explain not only what happens in each
of the two cases, but why it happens.
3) (10 points)
 Write a login script (.bash_profile) that does the following:
i. Set a feature on your bash shell session so that during
your shell session you can set a variable and it will be
automatically exported for child processes to access.
ii. Adds your personal bin directory (~/bin) at the end
of the PATH variable.
iii. Change the invocation of the ls command so that in a
login session it always displays a long listing (ls –l)
even when you only type ls with no options.
iv. Set a feature on your bash shell session so that
command line editing can be done in vi editing mode.
Page 563
4) (10 points) Q. 1.
5) (10 points) Q. 2.
6) (10 points) Q. 4.
 On sf05.cs.umb.edu, use the /etc/login.defs file instead of
the file that the book gives, and search for the string ENAB.
1
Page 581
7) (10 points) Q. 3.
8) (10 points) Q. 4.
9) (10 points) Q. 5.
2
Download