User Tools

Site Tools


haas:spring2014:unix:labs:lab4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:spring2014:unix:labs:lab4 [2014/02/09 14:52] – [Dot-Files] wedgehaas:spring2014:unix:labs:lab4 [2014/02/09 15:00] (current) – [Environment Variables] wedge
Line 138: Line 138:
 A major feature of the shell is its ability to store data in memory. There are several important environment variables used to modify the behavior of your terminal and login session. Some common ones are: A major feature of the shell is its ability to store data in memory. There are several important environment variables used to modify the behavior of your terminal and login session. Some common ones are:
  
-  * $PATH +  * <nowiki>$</nowiki>PATH 
-  * $HOSTNAME +  * <nowiki>$</nowiki>HOSTNAME 
-  * $USER +  * <nowiki>$</nowiki>USER 
-  * $TERM +  * <nowiki>$</nowiki>TERM 
-  * $SHELL+  * <nowiki>$</nowiki>SHELL
  
-Environment variables are identified with the $ prefixing an ALL-CAPITAL variable name. This is to visually distinguish them. Lowercase names can be used for personal variables that are declared.+Environment variables are identified with the <nowiki>$</nowiki> prefixing an ALL-CAPITAL variable name. This is to visually distinguish them. Lowercase names can be used for personal variables that are declared.
  
  
Line 153: Line 153:
 |:::^  d.|What is your path?| |:::^  d.|What is your path?|
  
-<WRAP round info box>The **echo** utility can also be used for displaying the contents of environment variables (in the form of: echo $VARNAME)</WRAP>+<WRAP round info box>The **echo** utility can also be used for displaying the contents of environment variables</WRAP>
  
 ^  5.  ^|Do the following:| ^  5.  ^|Do the following:|
Line 232: Line 232:
  
 ^  9.  ^|At your prompt, enter the following commands:| ^  9.  ^|At your prompt, enter the following commands:|
-| ^  a.|lab46:~$ echo "###"+| ^  a.|lab46:~<nowiki>$</nowiki> echo "###"
-|:::^  b.|lab46:~$ echo "You got it"| +|:::^  b.|lab46:~<nowiki>$</nowiki> echo "You got it"| 
-|:::^  c.|lab46:~$ echo "---"|+|:::^  c.|lab46:~<nowiki>$</nowiki> echo "---"|
 |:::^  d.|Type history. Do you see the echo statements listed?| |:::^  d.|Type history. Do you see the echo statements listed?|
 |:::^  e.|What number is the "You got it" line?| |:::^  e.|What number is the "You got it" line?|
Line 253: Line 253:
  
 ^  11.  ^|To take advantage of tab completions, let's enter some commands (don't hit enter unless instructed):| ^  11.  ^|To take advantage of tab completions, let's enter some commands (don't hit enter unless instructed):|
-| ^  a.|lab46:~$ cd /u <- hit tab|+| ^  a.|lab46:~<nowiki>$</nowiki> cd /u <- hit tab|
 |:::^  b.|What happens?| |:::^  b.|What happens?|
 |:::^  c.|[same line]: b <- hit tab| |:::^  c.|[same line]: b <- hit tab|
Line 259: Line 259:
 |:::^  e.|Press the enter key| |:::^  e.|Press the enter key|
 |:::^  f.|What is your current working directory?| |:::^  f.|What is your current working directory?|
-|:::^  g.|lab46:/usr/bin$ ls v <- hit tab|+|:::^  g.|lab46:/usr/bin<nowiki>$</nowiki> ls v <- hit tab|
 |:::^  h.|Does it beep?| |:::^  h.|Does it beep?|
 |:::^  i.|Press tab again.| |:::^  i.|Press tab again.|
Line 267: Line 267:
  
 <WRAP round info box>If you haven't provided unique enough information to the command-line, the //tab completion// cannot complete. Hitting **tab** a second time will give you a list of possible choices.</WRAP> <WRAP round info box>If you haven't provided unique enough information to the command-line, the //tab completion// cannot complete. Hitting **tab** a second time will give you a list of possible choices.</WRAP>
- 
 =====Conclusions===== =====Conclusions=====
 This assignment has activities which you should tend to- document/summarize knowledge learned on your Opus. This assignment has activities which you should tend to- document/summarize knowledge learned on your Opus.
  
 As always, the class mailing list and class IRC channel are available for assistance, but not answers. As always, the class mailing list and class IRC channel are available for assistance, but not answers.
haas/spring2014/unix/labs/lab4.1391957577.txt.gz · Last modified: 2014/02/09 14:52 by wedge