CPS 393 Lecture Notes - Lecture 3: Grep, Grave Accent, Command Substitution

182 views7 pages

Document Summary

Lecture 3: variables, quotes, substitution, read, test, control structures lecture. 0 is the number of command line args. It is the value of the return code of the previous command every unix command generates this return code. #eg2: mycmd file echo the first arg is echo the second arg is . # sh is the name of the command that is running. # in this case it would be sh = mycmd echo there were 0 arguments this time #runtime value that is set depending on the number o f args. # (does not include name of the command) Environment shell variables (not a major part of this course) gives info about current settings and configuration by convention, names are all uppercase run env" to see all the environment variables that exist. Bad: total, sum, count, x_value, first_name var, var1, var2, a, b, c. # program shell variables must be initialized before use:

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