COMP 206 Lecture Notes - Lecture 15: Shell Builtin, Command History, Working Directory

13 views4 pages
1 Sep 2018
Course
Professor

Document Summary

Hence, shell is sued to organize, repeat, and structure the execution of programs written in lower level languages. For example, file "hello_world. bash" with contents "echo hello world" In order to tell the shell that our program is bash, we have to include the first sentence of every bash program #!/bin/bash. The shell keeps track of a set of parameter names and values. Assignment just with equals (=): my_var = hello. We can access these variables and use them in many ways hen composing shell programs. Access with the dollar sign character: echo . Prefix the name of a shell variable with "$" Variable with an assignment command is a shell builtin command: Important note: there cannot be any spaces in the variable name, between the. Variable name and the equals, between the equals and the value, or within the. However, it is possible to use values with spaces by enclosing them in quotes:

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents