COMP 206 Lecture Notes - Lecture 1: Standard Streams, Binary File, Regular Expression
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.