Keeping up with class:
	From here on, commands will sometimes be more complicated
	A lot of times, some minor point is missed
		Don't feel bad, happens all the time
	Then it causes a command to be not quite understood
		Which prevents learning whatever it was supposed to teach you
	Then it turns into a bigger problem
	So if a minor point doesn't make sense, stop me and I'll explain

A couple things that will help you be fast:
	tab completion
	up arrow to cycle through old commands
	ctrl+r to search for old commands
		press it again to find the next result
		Enter if you find it
	Typing speed will improve over the next couple years
		Special characters
		Don't change posture 

A general note on special characters:
	Shell processing may change them!

Command line grammar, example:

grep -i note /usr/share/dict/american-english

This will find all lines that contain the word "note" in either case inside the file /usr/share/dict/american-english

Pieces and what they are, using examples from above:
	grep :   The command to run
	-i : A flag, or option.  These set options to commands.
	note : A parameter, or argument.  Input to the command that is not a flag. 
		For grep, this is the thing to search for
	/usr/share/dict/american-english
		Another parameter.  For grep, this indicates the file to search
	How these appear in the manual

Commands typically work like this.

Spaces are separators!  Like in English
	Commands never contain a space
	Files usually do not
		- Some people like to put them in filenames
		- Programmers usually don't
	If you need an actual space in a filename, there are two options:
		- Use quotes, "bad filename"
		- Use \, the escape character, bad\ filename

Where to specify in the command line:
	Generally speaking, flags can be specified in any order
	Flags can usually be combined ( -i -r should be equivalent to -ir )
	Some flags may require a parameter (-o outfile)
		- In that case, the parameter must follow the flag
		- Sometimes, no space is required (-lpthread)
		- Sometimes, it is used (-l pthread)
	There are short and long options
		- Short:  -r -h
		- Long:  --recursive --help
		- Generally, long options have two dashes

Most commands support -h, -v, --help, or --verbose
	Not all, but it is very common

If commands have a mandatory parameter, they will usually print out usage info without it

Sometimes commands require that flags come before parameters
	Usually this is due to a variable number of parameters
	Can't always count on that, and not all commands with variable parameters require it
	
A programming note:
	These appear as parameters to main in C/C++
		- Example with argc and argv
	In Python, you can import argv
	Generally, if you are writing a command-line tool, you should support flags
	There are libraries to help with that!
		- Example:  Python and argparse
		- For C:  getopt and argp

Lab 2, and the class of problems that grep solves
	How about finding out what frequency each core is running at?
	How often did I put the word "grep" in my notes last time?

The dictionary is in /usr/share/dict
	What words have "note" in them?

Intro to expressions:  . means any character
	How many words are at least 10 letters long?
	How many words have at least two letters before two e's?
	How many have a z followed by two letters followed by a p?
		- Yes, this would be useful for scrabble
	
Isolating things:
	Let's get the ipv6 address from ifconfig with head and tail
		- The main weakness of this:  Length matters!
		- It'll be ok for homework 2
		- Feel free to use a better method if you like
	An expression with grep:
		- Regular expressions can handle this.  We'll learn a piece today
		- Demo anyway with .*
		- Generally, you can match most anything with these
		- Regular expressions take time and practice to master
		- There is more than one syntax for these

We learned these characters for grep:  . * ^ $
	Go ahead and remember these.
	Probably can solve the homework 2 without them, but they might help

At this point, see a command as an assembly line

