Math-Tuttle-OSX:279lab08 smtuttle$ test -e pig.txt && echo 'you have that file'
Math-Tuttle-OSX:279lab08 smtuttle$ echo oink > pig.txt
Math-Tuttle-OSX:279lab08 smtuttle$ test -e pig.txt && echo 'you have that file'
you have that file
Math-Tuttle-OSX:279lab08 smtuttle$ test -e pig.txt
Math-Tuttle-OSX:279lab08 smtuttle$ test ! -e pig.txt && echo 'file does not exist'
Math-Tuttle-OSX:279lab08 smtuttle$ test ! -e pog.txt && echo 'file does not exist'
file does not exist

Math-Tuttle-OSX:279lab08 smtuttle$ exit-ex.sh pog.txt
./exit-ex.sh: pog.txt does not exist
  ...exiting
Math-Tuttle-OSX:279lab08 smtuttle$ exit-ex.sh pig.txt
       1       1       5 pig.txt
-rw-r--r--  1 smtuttle  smtuttle  5 Oct 10 15:07 pig.txt

Math-Tuttle-OSX:279lab08 smtuttle$ filename="My stuff.txt"
Math-Tuttle-OSX:279lab08 smtuttle$ echo $filename
My stuff.txt
Math-Tuttle-OSX:279lab08 smtuttle$ test $filename = "foo"
-bash: test: too many arguments
Math-Tuttle-OSX:279lab08 smtuttle$ test "$filename" = "foo"
Math-Tuttle-OSX:279lab08 smtuttle$ for-quotes.sh "moo baa la"
moo
baa
la
moo baa la

Math-Tuttle-OSX:279lab08 smtuttle$ chmod 700 more-than-5.sh 
Math-Tuttle-OSX:279lab08 smtuttle$ more-than-5.sh 
./more-than-5.sh: must have more than 5 command-line args
Math-Tuttle-OSX:279lab08 smtuttle$ more-than-5.sh 1 2 3 4 5
./more-than-5.sh: must have more than 5 command-line args
Math-Tuttle-OSX:279lab08 smtuttle$ more-than-5.sh 1 2 3 4 5 6
have more than five! have 6 

Math-Tuttle-OSX:279lab08 smtuttle$ echo $filename
My stuff.txt
Math-Tuttle-OSX:279lab08 smtuttle$ [[ $filename =~ tuff ]] && echo "matched"
matched
Math-Tuttle-OSX:279lab08 smtuttle$ [[ $filename =~ "tuff" ]] && echo "matched"
matched
Math-Tuttle-OSX:279lab08 smtuttle$ [[ $filename =~ t*uff ]] && echo "matched"
matched
Math-Tuttle-OSX:279lab08 smtuttle$ [[ $filename =~ "t*uff" ]] && echo "matched"
Math-Tuttle-OSX:279lab08 smtuttle$ [[ "$filename" =~ t*uff ]] && echo "matched"
matched

Math-Tuttle-OSX:279lab08 smtuttle$ glob-play.sh
moo matched *o

# put double quotes around moo -- [[ "moo" = *o ]]
Math-Tuttle-OSX:279lab08 smtuttle$ glob-play.sh
moo matched *o

# removed double quotes around moo, put double quotes around
#     *o      [[ moo = "*o" ]]
Math-Tuttle-OSX:279lab08 smtuttle$ glob-play.sh
moo did NOT match *o

# demo that need [[ ]] for this -- trying it with [ ]:
#     [ moo = *o ]
Math-Tuttle-OSX:279lab08 smtuttle$ glob-play.sh
./glob-play.sh: line 3: [: too many arguments
moo did NOT match *o

# now restored glob-play.sh to [[ moo = *o ]]

Math-Tuttle-OSX:279lab08 smtuttle$ read-lines-ex.sh 
$line: Howdy there
$line: line 2 is this line
$line: line 3 is this line
$line: 
$line: mooly
Math-Tuttle-OSX:279lab08 smtuttle$