Vous êtes sur la page 1sur 3

Exercise:Working in the Korn Shell

In this exercise, answer the questions on the material presented in this


module.
Preparation
No special preparation is required for this exercise.
RLCD
In addition to being able to use local classroom equipment, this lab was
designed to also use equipment located in a remote lab data center.
Directions for accessing and using this resource can be found at:
http://fn1.brom.suned.com/
Ask your instructor for the particular SSH configuration file that you
should use to access the appropriate remote equipment for this exercise.
Tasks
Complete the following steps. Write your answer in the space provided.
1. Which specific shell characters have special meaning to the shell?
Metacharacter relativos a pathname, filename y sustitucin de
redireccin
2. Name some common shell metacharacters.
Tilde, los caracteres *, #, (, ), >, <, /
3. Which metacharacter is a shell substitute for the home directory of a
user?
~
4. Navigate to your home directory from your current working
directory using the appropriate special metacharacter.

5. Which two metacharacters are often referred to as wildcard


characters?
*y?
6. Make sure you are in your home directory. List the contents of all the
files and directories in your home directory starting with dusing a
wild card entry.

7. Which character do you use to match a single character, excluding a


leading period?
?
8. Which character or characters would you use to match a set or range
of characters?
[-]
9. Which character or characters would you use to have the shell ignore
the special meaning of metacharacters?
' ', " ", \
10. What are file descriptors?
Estos son <,> sirven para dirigir la entrada y salida estandar
11. Which symbol or symbols do you use to redirect output and append
the output to a file?
>>
12. Which command redirects standard error messages?
command> filename
13. Which symbol or character do you use to connect two or more
commands on a single command line?
;
14. Define a variable. Name the kinds of variables used in Korn shell
programming.
Una variable contiene informacion necesaria acerca del Shell o
informacin para configurar el sistema o entorno de usuario
Ksh,set
15. Which command do you use to display shell variables and their
current values?
_____________________________________________________________
16. Which command do you use to display a list of previously executed
commands in the shell?
_____________________________________________________________
Exercise: Working in the Korn Shell
Using Commands Within the Shell 6-39
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
17. What is an initialization file?
_____________________________________________________________
_____________________________________________________________
18. List the four user initialization files described in this module.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
19. Edit your ~/.profilefile to set the ENVvariable to $HOME/.kshrc.
Also add /etcto your path.
20. Edit your ~/.kshrcfile to set the prompt to be hostnameand the
current directory.
21. Log out and log in again to check that your settings work.