-
What shell are you using? How do you know?
-
Do you have a .profile and/or a . kshrc file in your home directory? What is the difference between the .profile and .kshrc ? What is the ENV file and how can you invoke it if you make changes in it?
-
What is the default primary prompt? What is the default secondary prompt? Change your primary prompt at the command line so that it contains your login name .
-
What is the purpose of setting each of the following variables ?
-
set “o ignoreeof
-
set “o noclobber
-
set “o trackall
-
set “o monitor
-
set “o vi
Why are these variables set in the ENV file? What is the purpose of the PATH ? What are the elements of your PATH variable?
-
What is the difference between a local and an environment variable? How do you list all your variables? How do you list only environment variables? To list all your current option settings, type the following:
set o
Which set options are turned on?
-
Create a local variable called myname that contains your full name. Now export the variable. Type the following at the prompt:
ksh
Was the variable name exported? Type exit to get back to the parent shell. Make the variable name readonly . What is a readonly variable?
-
What are positional parameters normally used for?
-
Type the following:
set apples pears peaches plums
Using the positional parameters, print plums . Print apples peaches . Print apples pears peaches plums. Print the number of parameters. Reset the positional parameters to a list of veggies. Print the whole list of veggies. What happened to the fruit list?
-
Type the following:
set print $*
What happened?
-
Print the PID of the current shell. Type the following at the prompt:
grep $LOGNAME /etc/passwd echo $?
What does the $? tell you. What does the exit status tell you about the execution of a command?
-
Change both the primary and secondary prompt in your .profile . How do you re-execute the .profile file without logging out and logging back in?