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+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents