Find the answer to your Linux question:
Results 1 to 3 of 3
I HAVE THE FOLLOWING PROJECT TO DO, IF ANYBODY CAN GUIDE ME I WOULD APPRECIATE IT, Im new here and thought this could be a good place to start. Write ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    3

    Help With Linux Script


    I HAVE THE FOLLOWING PROJECT TO DO, IF ANYBODY CAN GUIDE ME I WOULD APPRECIATE IT, Im new here and thought this could be a good place to start.


    Write a shell script that implements a report writer. The script file should be called "report" and should be invocable as


    ./report


    from the command line. The script will assume 3 input files -- called "products", "sales", "associates" -- as described below:
    In your script you may use common Linux commands: make sure that your script runs fine on any Linux machine.

    File Specifications (click on the file name to get an example of the file):

    products: has the following fields, the field separator is ":"


    product id: an integer number

    description: alphanumeric text
    price: floating point number, with 2 significant digits
    sales: has the following fields, the field separator is ","

    product id: an integer number
    quantity: an integer number
    date: in the form of yyyy:mm:dd
    associate id: an integer number
    associates: has the following fields, the field separator is "/"

    associate id: an integer number
    name: alphanumeric text
    salary: an integer number
    position: alphanumeric text

    The script should compute the sale amounts per sales in the month of July 2007, and print them in a list ranked according to the sales amount. Your script should invoke Linux commands on the above files to produce a report on standard output. Here is an example of the script invocation:


    --------------------------------------------------------------------------------

    $ ./report

    Medical Supplies
    Products Ranking
    July 2007

    Description Associate Name Sale Amount
    ================================================== ======
    Infrared massager Adrian Stephan 342.32
    Wheelchair Lewis Polk 283.65
    IV pole Lewis Polk 246.86
    Stethoscope Olga Amador 226.24
    Blood pressure monitor Rina Jimenez 183.48
    IV pole Adrian Stephan 123.43
    Digital floor scale Rina Jimenez 107.52
    Digital floor scale Rina Jimenez 71.68
    Digital floor scale Rina Jimenez 71.68
    Digital floor scale Rina Jimenez 71.68
    Digital floor scale Rina Jimenez 71.68
    Feeding tube Rina Jimenez 43.90
    Digital floor scale Rosa Salgado 35.84
    $


    --------------------------------------------------------------------------------

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    I Dont want to be rude but..
    - Dont put all capital Sentences in there when not needed.
    - Why did you post this in the Other Distro instead of programming?
    - Why do you think we will write the code for you?

    I am glad to help you with your code but I am not going to write it from Scratch..
    So if you can ask specific questions I am glad to help.

    Oh, and sorry If I misunderstoud something.

    Cheers,
    Robin
    New Users, please read this..
    Google first, then ask..

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Sorry, but homework questions are not allowed to be posted on the forums:

    http://www.linuxforums.org/forum/lin...ums-rules.html

    Locking thread...
    oz

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •