CTS 1106 (Intro to Unix/Linux) Homework Assignment #5

 

Due: by the start of class on the date shown on the syllabus

Description:

Answer the following questions as briefly (but completely) as possible.  Unless otherwise stated, assume a POSIX shell (such as bash) is used.

  1. Using wild cards, frame a pattern where the first character is alphabetic and the last is not numeric.
  2. How do you remove a file beginning with a hyphen in the $HOME/foo directory?
  3. What happens when you use cat foo > foo?  What about sort -o foo < foo
  4. What is a filter command?  Where does a filter get its input from?
  5. What are the effects of using double quotes?
  6. What are two environment variables are set by reading /etc/passwd when you login?  (Actually there are 4.)
  7. How would you add the current directory (no matter what it is) to you existing PATH?  Why would that be a bad idea?
  8. If you run PS1='\!$', what sort of prompt will you get using the Korn shell or bash?
  9. Write a Korn or bash shell alias to list only the hidden files of the current directory.  (Extra credit if your alias doesn't list . or .. entries.)
  10. You have just used the command tar -cvf /dev/fd0 *.sh.  How can you repeat the command to use *.pl files instead of *.sh files, in the bash shell, without retyping the entire command?
  11. If your .profile contains statements like PATH=$PATH:$HOME/bin and PS1='$PWD$ ' and you make any changes to the file, how should you activate the changes?

To be turned in:

Email your homework assignment, by copy-and-paste (no attachments please!) to .  If possible use the text and not the HTML mode of your email program.  Please use the subject similar to Intro to Unix/Linux Homework Assignment #5 Submission, so I can tell which emails are submitted homework assignments.

Homework assignments will not be returned.  Please do not send as attachments.  Do not send to wpollock@YborStudent.hccfl.edu.  Refer to the Homework and the Submitting Assignments sections of your syllabus for more information.

Confused?  Send questions about the homework assignment to .  Please use a subject similar to Intro to Unix/Linux Homework Assignment #5 Questions so I can tell which emails are questions about assignment quiz (and not submissions).