CS138 Lecture Notes - Grep, Newline, Standard Streams
Document Summary
Echo: write arguments, separated by spaces and terminated with newline, evaluates written variables when in or no quotes, echos string in . Globbing: command-line pattern expansions, apply only to args (often, file names) not commands or options, * matches 0 or more characters. Q* matches filenames that start with q of any length. Does not match dotfiles matches 1 character. One character not in the set: [0-3] $ cd /users/migod/music/itunes/itunesmusic/biebersgold find: searches for files/dirs. within a directory hierarchy, according to various stated criteria, find [ dir-list ] [ expr , options. Name pattern restricts file names to globbing pattern. If dir-list omitted, search starting in current dir. If expr omitted, match all file names (like name * ) Logical not, and and or: examples. Finds all files starting with t, starting in current dir. Search and print lines matching pattern in files.