CS 497C - Homework 8 - Name:_________________ 1. You are afraid that you may accidently overwrite files with > symbol. What precaution will you take? Ans: Make the setting set -o noclobber (bash or Korn) or set noclobber (C shell). 2. When does a shell variable become an environment variable? Ans: When it is made available to all sub-shells with the export command or defined with the setenv statement (C shell). 3. How will you repeat the last command in the (i) C shell (ii) Korn (iii) bash? Ans: (i) !! (ii) r (iii) !! 4. If you have set noclobber to prevent overwriting, how will you overwrite files when you really need to in the (i) C shell (ii) Korn and bash? Ans: Instead of >, use (i) >! (ii) >|. 5. If you have kept all your aliases in the file .alias in your home directory, how can you ensure that they are available in all sub-shells of the (i) C shell (ii) Korn (iii) bash? Ans: Place this command in the respective environment file: (i) source ~/.alias (ii) . ~/.alias (iii) source ~/.alias