Find the answer to your Linux question:
Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By Irithori
I have files that collect information like: Monday.txt xxx student a xxx student b xxx student b xxx student b xxx student c xxx student c xxx student c Friday.txt ...
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    1

    Red face Help Me Please

    I have files that collect information like:

    Monday.txt


    xxx student a
    xxx student b
    xxx student b
    xxx student b
    xxx student c
    xxx student c
    xxx student c


    Friday.txt

    xxx student a
    xxx student a
    xxx student a
    xxx student b
    xxx student b
    xxx student c
    xxx student c
    xxx student c
    xxx student c



    I want to create script to count the student and display like:


    1. ask the day form user
    Enter day:

    2. If user input Monday the result is:


    Student name: student a Total :1
    Student name: student b Total : 3
    Student name: student c Total : 3
    Total : 7


    3. And if user enter Friday, the result is:


    Student name: student a Total :3
    Student name: student b Total : 2
    Student name: student c Total : 4
    Total : 9


    4. also, can ask like:

    Do Yo want to view other day? (y/n)

    y= return to program
    n= exit

    Who can I do?

    Thank you very much,

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,100
    hi and welcome

    Sorry, but homework questions are not allowed by the forum rules.
    boizlife likes this.
    You must always face the curtain with a bow.

Posting Permissions

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