title: UNIX homework due in 30 minutes, Still can't figure out how to make this work
body: <ol>
  <li>(50 pts) Write a script to report the percentage of upper-case letters to the total number of alphas for a filename specified as an argument on the command line. Within your script, you will need to</li>
  </ol>
  
  <p>a) Verify that there is only one command line argument. Make sure that the single filename argument is a readable file. If the number of arguments is not correct, display a usage statement and exit the script with an appropriate exit value. If the argument is not a readable file, display an error message along with a usage statement before exiting with an appropriate exit value.</p>
  
  <p>b) Count the number of upper-case letters from this file and assign the result to the shell variable UC_count.</p>
  
  <p>c) Count the number of alphas from this file and assign the result to the shell variable alpha_count.</p>
  
  <p>d) Using the bc command with an appropriate scale factor, calculate the percentage of upper case alphas in the file. Watch out for divide by zero errors. If the $alpha_count variable has a value of zero, display a specific message for that condition.</p>
  
  <ol start="2">
  <li>(25 pts) Using only the commands from this set (ls, grep, cut, sed, tr, for, and expr), write a script to report the size (in bytes) of the sum of all the file sizes (plain files only) in the current directory. That’s <em>in</em> the current directory, not “in and below” the current directory. Hidden files may remain hidden.</li>
  <li>(25 pts) Using only the commands ls, and awk, write a script to report the size (in bytes) of the sum of all the file sizes (plain files only) in the current directory. That’s <em>in</em> the current directory, not “in and below” the current directory. Hidden files may remain hidden.</li>
  </ol>
  
  <p><em>I would really appreciate it if someone could help me get started with this. I cant even figure out what to use first to pull out the uppercase letters. Looks like <code>grep</code> only gives me whole line matches and when I use <code>-o</code> I get nothing.</em></p>
  
  <p><strong>Progress so far:</strong></p>
  
  <pre><code>if [ $# -ne 1 ]
  then
  echo "Wrong number of arguments." 1&gt;&amp;2
  echo "Usage: $0 &lt;text_file&gt; 1&gt;$2
  exit 1
  fi
  </code></pre>