COMP 206 Lecture Notes - Lecture 1: Standard Streams, Binary File, Regular Expression

71 views8 pages

Document Summary

Expr: evaluates args as an arithmetic expresses & prints the result. Purpose is to be used to write programs in the shell (the shell can"t evaluate math expressions by itself, you need to call a program and set a variable to that result) Test: does comparisons on files, boolean result is the exit code of the program. Gt, -le, -eq, ext: numerical tests: greater than, less than, or equal to. Wc: counts the bytes, words, lines in files. Cd, mkdir, rm, rmdir (won"t work if there"s stuff in the directory), grep, head, tail, strings . To remove a directory with stuff in it, you have to start at the lowest level and remove from the bottom. F means don"t ask if i"m sure i want to delete. R makes it recursive rm rf / delete entire computer. Using time at the beginning times how long it took for the program to run. Every program returns a number 0 is ture.

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