Re: Calculate percentages

From: Tony Lawrence (foo_at_pcunix.com)
Date: 10/24/05


Date: Mon, 24 Oct 2005 06:00:16 -0400

Dion wrote:
> If you have read my query, which I'm sure you haven't, I didn't ask for
> the solution but for advice. Sometimes is better to think before
> talking! Since you are not able to give any advice, stop pretending
> being a smart guy!
>

That's great - be insulting.

But just in case you aren't as stupid as you seem, I'll take the above
as real.

First, you need to know how to create a shell script. See
http://aplawrence.com/Basics/scripting.html if you don't.

Next, you need to count lines. Start with "man wc". You need to
differentiate between comment lines and non-comment lines: "man grep".

But if you really want to impress your professor, I'd suggest you
submit an alternate solution using the shell's "read" function, and
"test" and "expr" (or built in math if you are allowed to use bash or
ksh). Finally, you should do one in awk and one in Perl.

You should look at "man bc" and "man dc" also, just for completeness.
If you really investigate all I've suggested here, you'll learn quite a bit.

-- 
Tony Lawrence
Unix/Linux/Mac OS X  resources: http://aplawrence.com
Geek Yard Sale: http://geekyardsale.com


Relevant Pages

  • Re: Best way to do db search for site
    ... I have not implimented a search feature yet for a web site yet and ... searching html files or other web files. ... I could do a query like: ... Thanks for any advice. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Best way to do db search for site
    ... I have not implimented a search feature yet for a web site yet and wanted ... searching html files or other web files. ... think the query would have to be expanded further to support more words. ... Thanks for any advice. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Multi-select list box as query parameter
    ... The query is rather complex and is not ... is a small Access database ... Dim varItem As Variant ... Any advice would be greatly appreciated. ...
    (microsoft.public.access.formscoding)
  • RE: Error message -- "property value is too large"
    ... > This way you can create your query displaying your data for the particular ... > Microsoft Security Bulletin MS03-026? ... > small problem when trying to divide by Business Days. ... I read the advice you age this other girl and it really ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Defining 2 foreign keys out of the same Primary key
    ... Advice comes from all types of people... ... confused advice in another forum. ... can't query on those fields - query based on the two tables with ... I can solve it by creating 2 identical tables tblDestinationFrom and ...
    (microsoft.public.access.tablesdbdesign)